Skip to content

Commit

Permalink
Merge tag 'batman-adv-fix-for-davem' of git://git.open-mesh.org/linux…
Browse files Browse the repository at this point in the history
…-merge

Included change:
- fix double free in case of failure during mesh initialisation

Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
David S. Miller committed May 23, 2013
2 parents c573972 + f69ae77 commit d02cea0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions net/batman-adv/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
1 change: 1 addition & 0 deletions net/batman-adv/soft-interface.c
Original file line number Diff line number Diff line change
Expand Up @@ -505,6 +505,7 @@ static int batadv_softif_init_late(struct net_device *dev)
batadv_debugfs_del_meshif(dev);
free_bat_counters:
free_percpu(bat_priv->bat_counters);
bat_priv->bat_counters = NULL;

return ret;
}
Expand Down

0 comments on commit d02cea0

Please sign in to comment.