diff options
author | David S. Miller <davem@davemloft.net> | 2013-05-23 00:08:36 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-05-23 00:08:36 -0700 |
commit | d02cea0f4341b25cae044d2ec393049d60bff036 (patch) | |
tree | 6be427ea03a60732e24e041b4ce7f4f30730db3d /net | |
parent | c573972c111eb4c6b3f3250ad71e7c75cc799833 (diff) | |
parent | f69ae770e74df420fbcf93aae81b30a5dcc73b7d (diff) |
Merge tag 'batman-adv-fix-for-davem' of git://git.open-mesh.org/linux-merge
Included change:
- fix double free in case of failure during mesh initialisation
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/batman-adv/main.c | 1 | ||||
-rw-r--r-- | net/batman-adv/soft-interface.c | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/net/batman-adv/main.c b/net/batman-adv/main.c index 1240f07ad31d..51aafd669cbb 100644 --- a/net/batman-adv/main.c +++ b/net/batman-adv/main.c @@ -181,6 +181,7 @@ void batadv_mesh_free(struct net_device *soft_iface) batadv_originator_free(bat_priv); free_percpu(bat_priv->bat_counters); + bat_priv->bat_counters = NULL; atomic_set(&bat_priv->mesh_state, BATADV_MESH_INACTIVE); } diff --git a/net/batman-adv/soft-interface.c b/net/batman-adv/soft-interface.c index 6f20d339e33a..819dfb006cdf 100644 --- a/net/batman-adv/soft-interface.c +++ b/net/batman-adv/soft-interface.c @@ -505,6 +505,7 @@ unreg_debugfs: batadv_debugfs_del_meshif(dev); free_bat_counters: free_percpu(bat_priv->bat_counters); + bat_priv->bat_counters = NULL; return ret; } |