diff options
author | Denis V. Lunev <den@openvz.org> | 2008-07-10 19:53:39 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-07-10 19:53:39 -0400 |
commit | fe785bee05f08d37b34b7399d003b74199274ce4 (patch) | |
tree | d87c30deefc4c35d5794879b3430470d554ae2a6 /net/netlabel/netlabel_mgmt.c | |
parent | 2e655571c618434c24ac2ca989374fdd84470d6d (diff) |
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: Denis V. Lunev <den@openvz.org>
Acked-by: Paul Moore <paul.moore@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/netlabel/netlabel_mgmt.c')
-rw-r--r-- | net/netlabel/netlabel_mgmt.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/net/netlabel/netlabel_mgmt.c b/net/netlabel/netlabel_mgmt.c index 22c191267808..44be5d5261f4 100644 --- a/net/netlabel/netlabel_mgmt.c +++ b/net/netlabel/netlabel_mgmt.c | |||
@@ -386,11 +386,7 @@ static int netlbl_mgmt_listdef(struct sk_buff *skb, struct genl_info *info) | |||
386 | rcu_read_unlock(); | 386 | rcu_read_unlock(); |
387 | 387 | ||
388 | genlmsg_end(ans_skb, data); | 388 | genlmsg_end(ans_skb, data); |
389 | 389 | return genlmsg_reply(ans_skb, info); | |
390 | ret_val = genlmsg_reply(ans_skb, info); | ||
391 | if (ret_val != 0) | ||
392 | goto listdef_failure; | ||
393 | return 0; | ||
394 | 390 | ||
395 | listdef_failure_lock: | 391 | listdef_failure_lock: |
396 | rcu_read_unlock(); | 392 | rcu_read_unlock(); |
@@ -501,11 +497,7 @@ static int netlbl_mgmt_version(struct sk_buff *skb, struct genl_info *info) | |||
501 | goto version_failure; | 497 | goto version_failure; |
502 | 498 | ||
503 | genlmsg_end(ans_skb, data); | 499 | genlmsg_end(ans_skb, data); |
504 | 500 | return genlmsg_reply(ans_skb, info); | |
505 | ret_val = genlmsg_reply(ans_skb, info); | ||
506 | if (ret_val != 0) | ||
507 | goto version_failure; | ||
508 | return 0; | ||
509 | 501 | ||
510 | version_failure: | 502 | version_failure: |
511 | kfree_skb(ans_skb); | 503 | kfree_skb(ans_skb); |