diff options
author | Daniel Lezcano <daniel.lezcano@free.fr> | 2009-02-22 00:07:53 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-02-22 00:07:53 -0800 |
commit | 486a87f1e5624096bd1c09e9e716239597d48dca (patch) | |
tree | bdcb9749acfa351d0e53a9b0b243b0de3ce0d02c /drivers/net/wireless/orinoco | |
parent | ee923623177249cf22c43419ad0e8ff926dd1f58 (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 'drivers/net/wireless/orinoco')
0 files changed, 0 insertions, 0 deletions