Skip to content

Commit

Permalink
netlabel: Deletion of an unnecessary check before the function call "…
Browse files Browse the repository at this point in the history
…cipso_v4_doi_putdef"

The cipso_v4_doi_putdef() function tests whether its argument is NULL and then
returns immediately. Thus the test around the call is not needed.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Acked-by: Paul Moore <paul@paul-moore.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Markus Elfring authored and David S. Miller committed Feb 4, 2015
1 parent 132d7bc commit 79b7cf6
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions net/netlabel/netlabel_mgmt.c
Original file line number Diff line number Diff line change
Expand Up @@ -242,8 +242,7 @@ static int netlbl_mgmt_add_common(struct genl_info *info,
return 0;

add_failure:
if (cipsov4)
cipso_v4_doi_putdef(cipsov4);
cipso_v4_doi_putdef(cipsov4);
if (entry)
kfree(entry->domain);
kfree(addrmap);
Expand Down

0 comments on commit 79b7cf6

Please sign in to comment.