summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CORE/SERVICES/WMA/wma.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/CORE/SERVICES/WMA/wma.c b/CORE/SERVICES/WMA/wma.c
index 2e74ce256dce..c080a0bde457 100644
--- a/CORE/SERVICES/WMA/wma.c
+++ b/CORE/SERVICES/WMA/wma.c
@@ -5131,10 +5131,11 @@ VOS_STATUS wma_process_roam_scan_req(tp_wma_handle wma_handle,
WMA_LOGI("%s: command 0x%x", __func__, roam_req->Command);
if (!wma_handle->roam_offload_enabled) {
- /* roam scan offload is not enabled in firmware.
- * Cannot initialize it in the middle of connection.
- */
- return VOS_STATUS_E_PERM;
+ /* roam scan offload is not enabled in firmware.
+ * Cannot initialize it in the middle of connection.
+ */
+ vos_mem_free(roam_req);
+ return VOS_STATUS_E_PERM;
}
switch (roam_req->Command) {
case ROAM_SCAN_OFFLOAD_START: