diff options
Diffstat (limited to 'net/tipc/netlink_compat.c')
-rw-r--r-- | net/tipc/netlink_compat.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/net/tipc/netlink_compat.c b/net/tipc/netlink_compat.c index 0bfd03d67fdd..340a6e7c43a7 100644 --- a/net/tipc/netlink_compat.c +++ b/net/tipc/netlink_compat.c | |||
@@ -267,8 +267,14 @@ static int tipc_nl_compat_dumpit(struct tipc_nl_compat_cmd_dump *cmd, | |||
267 | if (msg->rep_type) | 267 | if (msg->rep_type) |
268 | tipc_tlv_init(msg->rep, msg->rep_type); | 268 | tipc_tlv_init(msg->rep, msg->rep_type); |
269 | 269 | ||
270 | if (cmd->header) | 270 | if (cmd->header) { |
271 | (*cmd->header)(msg); | 271 | err = (*cmd->header)(msg); |
272 | if (err) { | ||
273 | kfree_skb(msg->rep); | ||
274 | msg->rep = NULL; | ||
275 | return err; | ||
276 | } | ||
277 | } | ||
272 | 278 | ||
273 | arg = nlmsg_new(0, GFP_KERNEL); | 279 | arg = nlmsg_new(0, GFP_KERNEL); |
274 | if (!arg) { | 280 | if (!arg) { |