summaryrefslogtreecommitdiffstats
path: root/net/tipc
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2017-08-22 02:06:42 +0200
committerDavid S. Miller <davem@davemloft.net>2017-08-22 02:06:42 +0200
commite2a7c34fb2856fd5306e307e170e3dde358d0dce (patch)
treeafeb300b04186b1a1f649b2cd8a401a75878297c /net/tipc
parentnet: sched: Add the invalid handle check in qdisc_class_find (diff)
parentMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc (diff)
downloadlinux-e2a7c34fb2856fd5306e307e170e3dde358d0dce.tar.xz
linux-e2a7c34fb2856fd5306e307e170e3dde358d0dce.zip
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Diffstat (limited to 'net/tipc')
-rw-r--r--net/tipc/netlink_compat.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/net/tipc/netlink_compat.c b/net/tipc/netlink_compat.c
index 9bfe886ab330..750949dfc1d7 100644
--- a/net/tipc/netlink_compat.c
+++ b/net/tipc/netlink_compat.c
@@ -258,13 +258,15 @@ static int tipc_nl_compat_dumpit(struct tipc_nl_compat_cmd_dump *cmd,
arg = nlmsg_new(0, GFP_KERNEL);
if (!arg) {
kfree_skb(msg->rep);
+ msg->rep = NULL;
return -ENOMEM;
}
err = __tipc_nl_compat_dumpit(cmd, msg, arg);
- if (err)
+ if (err) {
kfree_skb(msg->rep);
-
+ msg->rep = NULL;
+ }
kfree_skb(arg);
return err;