diff mbox

[1/2] iw: DEREF_AFTER_NULL: fix

Message ID 1448529019-661-1-git-send-email-rahul.jain@samsung.com (mailing list archive)
State Accepted
Delegated to: Johannes Berg
Headers show

Commit Message

Rahul Jain Nov. 26, 2015, 9:10 a.m. UTC
From: Amit Khatri <amit.khatri@samsung.com>

Signed-off-by: Amit Khatri <amit.khatri@samsung.com>
Signed-off-by: Rahul Jain <rahul.jain@samsung.com>
---
 wowlan.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Johannes Berg Nov. 26, 2015, 5:43 p.m. UTC | #1
Applied, but please use better coding style and a useful commit message
next time.

johannes
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/wowlan.c b/wowlan.c
index 25f260b..ac2c13d 100644
--- a/wowlan.c
+++ b/wowlan.c
@@ -194,7 +194,8 @@  static int wowlan_parse_tcp_file(struct nl_msg *msg, const char *fn)
 	err = -ENOBUFS;
  close:
 	fclose(f);
-	nla_nest_end(msg, tcp);
+	if(tcp)
+		nla_nest_end(msg, tcp);
 	return err;
 }