Skip to content

Commit

Permalink
netfilter: ctnetlink: remove null test before kfree
Browse files Browse the repository at this point in the history
Fix checkpatch warning:
WARNING: kfree(NULL) is safe this check is probably not required

Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
  • Loading branch information
Fabian Frederick authored and Pablo Neira Ayuso committed Jun 25, 2014
1 parent 5433ba3 commit 397304b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions net/netfilter/nf_conntrack_netlink.c
Original file line number Diff line number Diff line change
Expand Up @@ -742,8 +742,7 @@ static int ctnetlink_done(struct netlink_callback *cb)
{
if (cb->args[1])
nf_ct_put((struct nf_conn *)cb->args[1]);
if (cb->data)
kfree(cb->data);
kfree(cb->data);
return 0;
}

Expand Down

0 comments on commit 397304b

Please sign in to comment.