diff options
| author | Daniel Lezcano <[email protected]> | 2009-02-22 08:07:53 +0000 |
|---|---|---|
| committer | David S. Miller <[email protected]> | 2009-02-22 08:07:53 +0000 |
| commit | 486a87f1e5624096bd1c09e9e716239597d48dca (patch) | |
| tree | bdcb9749acfa351d0e53a9b0b243b0de3ce0d02c /scripts/unifdef.c | |
| parent | veth : add the set_mac_address capability (diff) | |
| download | kernel-486a87f1e5624096bd1c09e9e716239597d48dca.tar.gz kernel-486a87f1e5624096bd1c09e9e716239597d48dca.zip | |
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 <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'scripts/unifdef.c')
0 files changed, 0 insertions, 0 deletions
