[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1411573940-14079-13-git-send-email-ahmed@gandi.net>
Date: Wed, 24 Sep 2014 17:52:08 +0200
From: Ahmed Amamou <ahmed@...di.net>
To: netdev@...r.kernel.org
Cc: william@...di.net, f.cachereul@...halink.fr,
Ahmed Amamou <ahmed@...di.net>,
Kamel Haddadou <kamel@...di.net>
Subject: [RFC PATCH 12/24] net: rbridge: Clean up rbr_node on rbridge stop
in order to avoid memleak need to clean all rbr_node once rbridge is stopped
Signed-off-by: Ahmed Amamou <ahmed@...di.net>
Signed-off-by: Kamel Haddadou <kamel@...di.net>
Signed-off-by: William Dauchy <william@...di.net>
---
net/bridge/rbridge/rbr.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/net/bridge/rbridge/rbr.c b/net/bridge/rbridge/rbr.c
index 1df8f8d..edd1e7c 100644
--- a/net/bridge/rbridge/rbr.c
+++ b/net/bridge/rbridge/rbr.c
@@ -13,6 +13,7 @@
*/
#include "br_private.h"
#include "rbr_private.h"
+static void rbr_del_all(struct rbr *rbr);
static struct rbr *add_rbr(struct net_bridge *br)
{
@@ -61,6 +62,7 @@ static void br_trill_stop(struct net_bridge *br)
br->rbr = NULL;
if (likely(old)) {
spin_lock_bh(&br->lock);
+ rbr_del_all(old);
kfree(old);
spin_unlock_bh(&br->lock);
}
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists