Package: broadcom-sta-dkms
Version: 6.30.223.271-4
While fixing the issue reported in bug #843387 I noticed a code path that
causes a memory leak. Included is patch with the fix.
--
Luis Ortega Pérez de Villar
--- a/amd64/src/wl/sys/wl_cfg80211_hybrid.c
+++ b/amd64/src/wl/sys/wl_cfg80211_hybrid.c
@@ -2006,14 +2006,14 @@
#endif
if (freq == 0) {
WL_ERR(("Invalid channel, fail to chcnage channel to freq\n"));
- kfree(notif_bss_info);
- return -EINVAL;
+ err = -EINVAL;
+ goto inform_single_bss_out;
}
channel = ieee80211_get_channel(wiphy, freq);
if (unlikely(!channel)) {
WL_ERR(("ieee80211_get_channel error\n"));
- kfree(notif_bss_info);
- return -EINVAL;
+ err = -EINVAL;
+ goto inform_single_bss_out;
}
WL_DBG(("SSID : \"%s\", rssi %d, channel %d, capability : 0x04%x, bssid %pM\n",
@@ -2034,8 +2034,10 @@
(const u8 *)notify_ie, notify_ielen, signal, GFP_KERNEL);
#endif
- if (unlikely(!cbss))
- return -ENOMEM;
+ if (unlikely(!cbss)) {
+ err = -ENOMEM;
+ goto inform_single_bss_out;
+ }
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 9, 0)
cfg80211_put_bss(wiphy, cbss);
@@ -2043,6 +2045,7 @@
cfg80211_put_bss(cbss);
#endif
+inform_single_bss_out:
kfree(notif_bss_info);
return err;