Browse Source

qcacld-3.0: Fix memory leak in wma_roam_scan_filter

In function wma_roam_scan_filter, memory is allocated to local variable
params. And in default case of the switch, we are returning from the function
without freeing the params memory, this cause memory leak.

To fix this, free params memory before return in switch case.

Change-Id: I0a8825b44f4bcd9b05f0e1f0e6cdd0d114af0a01
CRs-Fixed: 1048116
Arif Hussain 8 years ago
parent
commit
a915f49b93
1 changed files with 1 additions and 0 deletions
  1. 1 0
      core/wma/src/wma_scan_roam.c

+ 1 - 0
core/wma/src/wma_scan_roam.c

@@ -1567,6 +1567,7 @@ QDF_STATUS wma_roam_scan_filter(tp_wma_handle wma_handle,
 			break;
 		default:
 			WMA_LOGD("%s : Roam Filter need not be sent", __func__);
+			qdf_mem_free(params);
 			return QDF_STATUS_SUCCESS;
 		}
 	} else {