From 70f77c51bd08e47fd3397785aa8db27e01635340 Mon Sep 17 00:00:00 2001 From: Shashikala Prabhu Date: Thu, 26 Oct 2017 14:50:41 +0530 Subject: [PATCH] qcacmn: Fix invalid memory free Problem: Memory is allocated for avoid_freq_ind in reg_call_chan_change_cbks function and freed when avoid_freq_ind is NULL. Solution: Memory is freed when avoid_freq_ind is not NULL. Change-Id: I263441c5b05755054ee581b20af191d93c3dea5e CRs-Fixed: 2124580 --- umac/regulatory/core/src/reg_services.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/umac/regulatory/core/src/reg_services.c b/umac/regulatory/core/src/reg_services.c index 4109f697effb..8a8625edcfd4 100644 --- a/umac/regulatory/core/src/reg_services.c +++ b/umac/regulatory/core/src/reg_services.c @@ -2210,7 +2210,7 @@ skip_ch_avoid_ind: cbk_list[ctr].arg); } qdf_mem_free(cur_chan_list); - if (!avoid_freq_ind) + if (avoid_freq_ind) qdf_mem_free(avoid_freq_ind); }