Thread (2 messages) 2 messages, 2 authors, 2015-08-13

Re: [PATCH 2/4] iw: Avoid possible memory leak for cb. cb got memory from nl_cb_alloc() but not doing free

From: Johannes Berg <johannes@sipsolutions.net>
Date: 2015-08-13 08:52:58

On Fri, 2015-06-26 at 09:10 +0000, Amit Khatri wrote:
Hi Johannes,

Subject: [PATCH 2/4] iw: Avoid possible memory leak for cb. cb got 
memory from
 nl_cb_alloc() but not doing free
Please fix your submission process to not mangle patches. I've applied
patch 1 in this series and fixed it up manually, but having the subject
again inside the email just makes it harder for me to pick up the
patches.
quoted hunk ↗ jump to hunk
Signed-off-by: Amit Khatri <redacted>
Signed-off-by: Rahul Jain <redacted>
---
 iw.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/iw.c b/iw.c
index dc99566..1e913b6 100644
--- a/iw.c
+++ b/iw.c
@@ -477,8 +477,8 @@ static int __handle_cmd(struct nl80211_state 
*state, enum id_input idby,
 	while (err > 0)
 		nl_recvmsgs(state->nl_sock, cb);
  out:
-	nl_cb_put(cb);
  out_free_msg:
+	nl_cb_put(cb);
Please don't leave two equivalent labels, remove one of them and
replace the users.

johannes
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help