Commit fe785bee authored by Denis V. Lunev's avatar Denis V. Lunev Committed by David S. Miller

netlabel: netlink_unicast calls kfree_skb on error path by itself

So, no need to kfree_skb here on the error path. In this case we can
simply return.
Signed-off-by: default avatarDenis V. Lunev <den@openvz.org>
Acked-by: default avatarPaul Moore <paul.moore@hp.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 2e655571
...@@ -584,12 +584,7 @@ list_start: ...@@ -584,12 +584,7 @@ list_start:
rcu_read_unlock(); rcu_read_unlock();
genlmsg_end(ans_skb, data); genlmsg_end(ans_skb, data);
return genlmsg_reply(ans_skb, info);
ret_val = genlmsg_reply(ans_skb, info);
if (ret_val != 0)
goto list_failure;
return 0;
list_retry: list_retry:
/* XXX - this limit is a guesstimate */ /* XXX - this limit is a guesstimate */
......
...@@ -386,11 +386,7 @@ static int netlbl_mgmt_listdef(struct sk_buff *skb, struct genl_info *info) ...@@ -386,11 +386,7 @@ static int netlbl_mgmt_listdef(struct sk_buff *skb, struct genl_info *info)
rcu_read_unlock(); rcu_read_unlock();
genlmsg_end(ans_skb, data); genlmsg_end(ans_skb, data);
return genlmsg_reply(ans_skb, info);
ret_val = genlmsg_reply(ans_skb, info);
if (ret_val != 0)
goto listdef_failure;
return 0;
listdef_failure_lock: listdef_failure_lock:
rcu_read_unlock(); rcu_read_unlock();
...@@ -501,11 +497,7 @@ static int netlbl_mgmt_version(struct sk_buff *skb, struct genl_info *info) ...@@ -501,11 +497,7 @@ static int netlbl_mgmt_version(struct sk_buff *skb, struct genl_info *info)
goto version_failure; goto version_failure;
genlmsg_end(ans_skb, data); genlmsg_end(ans_skb, data);
return genlmsg_reply(ans_skb, info);
ret_val = genlmsg_reply(ans_skb, info);
if (ret_val != 0)
goto version_failure;
return 0;
version_failure: version_failure:
kfree_skb(ans_skb); kfree_skb(ans_skb);
......
...@@ -1107,11 +1107,7 @@ static int netlbl_unlabel_list(struct sk_buff *skb, struct genl_info *info) ...@@ -1107,11 +1107,7 @@ static int netlbl_unlabel_list(struct sk_buff *skb, struct genl_info *info)
goto list_failure; goto list_failure;
genlmsg_end(ans_skb, data); genlmsg_end(ans_skb, data);
return genlmsg_reply(ans_skb, info);
ret_val = genlmsg_reply(ans_skb, info);
if (ret_val != 0)
goto list_failure;
return 0;
list_failure: list_failure:
kfree_skb(ans_skb); kfree_skb(ans_skb);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment