aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/igmp.c
diff options
context:
space:
mode:
authorDaniel Lezcano <daniel.lezcano@free.fr>2009-02-22 03:07:53 -0500
committerDavid S. Miller <davem@davemloft.net>2009-02-22 03:07:53 -0500
commit486a87f1e5624096bd1c09e9e716239597d48dca (patch)
treebdcb9749acfa351d0e53a9b0b243b0de3ce0d02c /net/ipv4/igmp.c
parentee923623177249cf22c43419ad0e8ff926dd1f58 (diff)
netns: fix double free at netns creation
This patch fix a double free when a network namespace fails. The previous code does a kfree of the net_generic structure when one of the init subsystem initialization fails. The 'setup_net' function does kfree(ng) and returns an error. The caller, 'copy_net_ns', call net_free on error, and this one calls kfree(net->gen), making this pointer freed twice. This patch make the code symetric, the net_alloc does the net_generic allocation and the net_free frees the net_generic. Signed-off-by: Daniel Lezcano <daniel.lezcano@free.fr> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/igmp.c')
0 files changed, 0 insertions, 0 deletions