[PATCH][BRIDGE] Lost call to br_fdb_fini() in br_init() error path

Pavel Emelyanov xemul at openvz.org
Tue Nov 27 06:39:42 PST 2007

In case the br_netfilter_init() (or any subsequent call) 
fails, the br_fdb_fini() must be called to free the allocated
in br_fdb_init() br_fdb_cache kmem cache.

Signed-off-by: Pavel Emelyanov <xemul at openvz.org>


diff --git a/net/bridge/br.c b/net/bridge/br.c
index 93867bb..a901828 100644
--- a/net/bridge/br.c
+++ b/net/bridge/br.c
@@ -39,7 +39,7 @@ static int __init br_init(void)
 	err = br_fdb_init();
 	if (err)
-		goto err_out1;
+		goto err_out;
 	err = br_netfilter_init();
 	if (err)
@@ -65,6 +65,8 @@ err_out3:
+	br_fdb_fini();
 	return err;

More information about the Bridge mailing list