linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] iw: Memory leak in error condition
@ 2015-09-30 23:01 Ola Olsson
  2015-09-30 23:16 ` James Cameron
  0 siblings, 1 reply; 7+ messages in thread
From: Ola Olsson @ 2015-09-30 23:01 UTC (permalink / raw)
  To: johannes; +Cc: linux-wireless

>From 5239e8e9aa79a131b716398efbf7a1203decbd9b Mon Sep 17 00:00:00 2001
From: Ola Olsson <ola.olsson@sonymobile.com>
Date: Thu, 1 Oct 2015 00:43:06 +0200
Subject: [PATCH] iw: Memory leak in error condition Signed-off-by: Ola
 Olsson <ola.olsson@sonymobile.com>

---
 scan.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/scan.c b/scan.c
index e959c1b..f248981 100644
--- a/scan.c
+++ b/scan.c
@@ -446,6 +446,8 @@ static int handle_scan(struct nl80211_state *state,
        if (ies || meshid) {
                tmpies = (unsigned char *) malloc(ies_len + meshid_len);
                if (!tmpies)
+                       free(ies);
+                       free(meshid);
                        goto nla_put_failure;
                if (ies) {
                        memcpy(tmpies, ies, ies_len);
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2015-10-08  9:37 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-30 23:01 [PATCH] iw: Memory leak in error condition Ola Olsson
2015-09-30 23:16 ` James Cameron
2015-09-30 23:27   ` Ola Olsson
2015-09-30 23:34     ` Julian Calaby
2015-09-30 23:39       ` Ola Olsson
2015-09-30 23:40         ` Julian Calaby
2015-10-08  9:37     ` Johannes Berg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).