Message ID | 1301667827-20056-1-git-send-email-julia@diku.dk (mailing list archive) |
---|---|
State | Not Applicable, archived |
Headers | show |
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;