diff options
Diffstat (limited to 'net/tipc/netlink_compat.c')
-rw-r--r-- | net/tipc/netlink_compat.c | 6 |
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, | |||
258 | arg = nlmsg_new(0, GFP_KERNEL); | 258 | arg = nlmsg_new(0, GFP_KERNEL); |
259 | if (!arg) { | 259 | if (!arg) { |
260 | kfree_skb(msg->rep); | 260 | kfree_skb(msg->rep); |
261 | msg->rep = NULL; | ||
261 | return -ENOMEM; | 262 | return -ENOMEM; |
262 | } | 263 | } |
263 | 264 | ||
264 | err = __tipc_nl_compat_dumpit(cmd, msg, arg); | 265 | err = __tipc_nl_compat_dumpit(cmd, msg, arg); |
265 | if (err) | 266 | if (err) { |
266 | kfree_skb(msg->rep); | 267 | kfree_skb(msg->rep); |
267 | 268 | msg->rep = NULL; | |
269 | } | ||
268 | kfree_skb(arg); | 270 | kfree_skb(arg); |
269 | 271 | ||
270 | return err; | 272 | return err; |