diff mbox

[1/6] drivers/staging/brcm80211/brcmfmac/wl_iw.c: introduce missing kfree

Message ID 1301667827-20056-1-git-send-email-julia@diku.dk (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Julia Lawall April 1, 2011, 2:23 p.m. UTC
None
diff mbox

Patch

diff --git a/drivers/staging/brcm80211/brcmfmac/wl_iw.c b/drivers/staging/brcm80211/brcmfmac/wl_iw.c
index b49957f..4e4cf36 100644
--- a/drivers/staging/brcm80211/brcmfmac/wl_iw.c
+++ b/drivers/staging/brcm80211/brcmfmac/wl_iw.c
@@ -3672,8 +3672,10 @@  int wl_iw_attach(struct net_device *dev, void *dhdp)
 		return -ENOMEM;
 
 	iscan->iscan_ex_params_p = kmalloc(params_size, GFP_KERNEL);
-	if (!iscan->iscan_ex_params_p)
+	if (!iscan->iscan_ex_params_p) {
+		kfree(iscan);
 		return -ENOMEM;
+	}
 	iscan->iscan_ex_param_size = params_size;
 	iscan->sysioc_tsk = NULL;