From: Jia-Ju Bai <baijiaju1990@163.com> To: sgruszka@redhat.com, kvalo@codeaurora.org, johannes.berg@intel.com, emmanuel.grumbach@intel.com Cc: ilw@linux.intel.com, linuxwifi@intel.com, linux-wireless@vger.kernel.org, netdev@vger.kernel.org, Jia-Ju Bai <baijiaju1990@163.com> Subject: [PATCH] iwl4965: Fix a memory leak in error handling code of __il4965_up Date: Sun, 10 Jan 2016 10:19:23 +0800 [thread overview] Message-ID: <1452392363-3600-1-git-send-email-baijiaju1990@163.com> (raw) When il4965_hw_nic_init in __il4965_up fails, the memory allocated by iwl4965_sta_alloc_lq in iwl4965_alloc_bcast_station is not freed. This patches adds il_dealloc_bcast_stations in the error handling code of __il4965_up to fix this problem. This patch has been tested in real device, and it actually fixes the bug. Signed-off-by: Jia-Ju Bai <baijiaju1990@163.com> --- drivers/net/wireless/iwlegacy/4965-mac.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/wireless/iwlegacy/4965-mac.c b/drivers/net/wireless/iwlegacy/4965-mac.c index 6656215..fd7b5c7 100644 --- a/drivers/net/wireless/iwlegacy/4965-mac.c +++ b/drivers/net/wireless/iwlegacy/4965-mac.c @@ -5577,6 +5577,7 @@ __il4965_up(struct il_priv *il) ret = il4965_hw_nic_init(il); if (ret) { IL_ERR("Unable to init nic\n"); + il_dealloc_bcast_stations(il); return ret; } -- 1.7.9.5
WARNING: multiple messages have this Message-ID (diff)
From: Jia-Ju Bai <baijiaju1990-9Onoh4P/yGk@public.gmane.org> To: sgruszka-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org, kvalo-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org, johannes.berg-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org, emmanuel.grumbach-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org Cc: ilw-VuQAYsv1563Yd54FQh9/CA@public.gmane.org, linuxwifi-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org, linux-wireless-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Jia-Ju Bai <baijiaju1990-9Onoh4P/yGk@public.gmane.org> Subject: [PATCH] iwl4965: Fix a memory leak in error handling code of __il4965_up Date: Sun, 10 Jan 2016 10:19:23 +0800 [thread overview] Message-ID: <1452392363-3600-1-git-send-email-baijiaju1990@163.com> (raw) When il4965_hw_nic_init in __il4965_up fails, the memory allocated by iwl4965_sta_alloc_lq in iwl4965_alloc_bcast_station is not freed. This patches adds il_dealloc_bcast_stations in the error handling code of __il4965_up to fix this problem. This patch has been tested in real device, and it actually fixes the bug. Signed-off-by: Jia-Ju Bai <baijiaju1990-9Onoh4P/yGk@public.gmane.org> --- drivers/net/wireless/iwlegacy/4965-mac.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/wireless/iwlegacy/4965-mac.c b/drivers/net/wireless/iwlegacy/4965-mac.c index 6656215..fd7b5c7 100644 --- a/drivers/net/wireless/iwlegacy/4965-mac.c +++ b/drivers/net/wireless/iwlegacy/4965-mac.c @@ -5577,6 +5577,7 @@ __il4965_up(struct il_priv *il) ret = il4965_hw_nic_init(il); if (ret) { IL_ERR("Unable to init nic\n"); + il_dealloc_bcast_stations(il); return ret; } -- 1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html
next reply other threads:[~2016-01-10 2:19 UTC|newest] Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top 2016-01-10 2:19 Jia-Ju Bai [this message] 2016-01-10 2:19 ` [PATCH] iwl4965: Fix a memory leak in error handling code of __il4965_up Jia-Ju Bai 2016-01-11 12:16 ` Stanislaw Gruszka 2016-01-11 12:16 ` Stanislaw Gruszka 2016-01-11 12:44 ` Kalle Valo 2016-01-11 13:41 ` Jia-Ju Bai -- strict thread matches above, loose matches on Subject: below -- 2016-01-07 12:17 Jia-Ju Bai 2016-01-11 12:13 ` Stanislaw Gruszka
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=1452392363-3600-1-git-send-email-baijiaju1990@163.com \ --to=baijiaju1990@163.com \ --cc=emmanuel.grumbach@intel.com \ --cc=ilw@linux.intel.com \ --cc=johannes.berg@intel.com \ --cc=kvalo@codeaurora.org \ --cc=linux-wireless@vger.kernel.org \ --cc=linuxwifi@intel.com \ --cc=netdev@vger.kernel.org \ --cc=sgruszka@redhat.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.