public inbox for b.a.t.m.a.n@lists.open-mesh.org
 help / color / mirror / Atom feed
* [B.A.T.M.A.N.] [PATCH] batman-adv: Avoid double freeing of bat_counters
@ 2013-04-17 10:28 Martin Hundebøll
  2013-04-17 12:05 ` Antonio Quartulli
  0 siblings, 1 reply; 7+ messages in thread
From: Martin Hundebøll @ 2013-04-17 10:28 UTC (permalink / raw)
  To: b.a.t.m.a.n; +Cc: Martin Hundebøll

On errors in batadv_mesh_init(), bat_counters will be freed in both
batadv_mesh_free() and batadv_softif_init_late(). This patch fixes this
by returning earlier from batadv_softif_init_late() in case of errors in
batadv_mesh_init().

Signed-off-by: Martin Hundebøll <martin@hundeboll.net>
---
 soft-interface.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/soft-interface.c b/soft-interface.c
index c2a9c20..4de4d0f 100644
--- a/soft-interface.c
+++ b/soft-interface.c
@@ -503,6 +503,9 @@ static int batadv_softif_init_late(struct net_device *dev)
 
 unreg_debugfs:
 	batadv_debugfs_del_meshif(dev);
+
+	return ret;
+
 free_bat_counters:
 	free_percpu(bat_priv->bat_counters);
 
-- 
1.8.2.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread
[parent not found: <pull request for net: batman-adv 2013-05-21>]

end of thread, other threads:[~2013-05-21 19:53 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-17 10:28 [B.A.T.M.A.N.] [PATCH] batman-adv: Avoid double freeing of bat_counters Martin Hundebøll
2013-04-17 12:05 ` Antonio Quartulli
2013-04-17 12:36   ` [B.A.T.M.A.N.] [PATCHv2] " Martin Hundebøll
2013-04-17 15:56     ` Marek Lindner
2013-04-17 19:13       ` [B.A.T.M.A.N.] [PATCHv3] " Martin Hundebøll
2013-04-17 19:53         ` Marek Lindner
     [not found] <pull request for net: batman-adv 2013-05-21>
2013-05-21 19:53 ` [B.A.T.M.A.N.] (no subject) Antonio Quartulli
2013-05-21 19:53   ` [B.A.T.M.A.N.] [PATCH] batman-adv: Avoid double freeing of bat_counters Antonio Quartulli

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox