From: Amitkumar Karwar Date: Sat, 18 May 2013 00:50:20 +0000 (-0700) Subject: mwifiex: remove global user_scan_cfg variable X-Git-Tag: v3.11-rc1~16^2~103^2^2~92 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=75ab753d7704f0bd34e09d5e4081bc73fdddd775;p=pandora-kernel.git mwifiex: remove global user_scan_cfg variable As the variable is used only for preparation of internal scan commands, we don't need to keep it allocated until the entire scan completes. We will define it as a local variable and free immediately after it's use. New flag 'scan_aborting' is added to handle race between mwifiex_close() and scan handler. Previously user_scan_cfg pointer used to take care of this. This patch fixes a memory leak in mwifiex_cfg80211_scan after running "iwlist mlan0 scan & sleep 1; rmmod mwifiex_sdio". Reported-by: Daniel Drake Tested-by: Daniel Drake Signed-off-by: Amitkumar Karwar Signed-off-by: Bing Zhao Signed-off-by: John W. Linville --- Reading git-diff-tree failed