From: Pavel Emelyanov Date: Thu, 29 Nov 2007 12:41:43 +0000 (+1100) Subject: [BRIDGE]: Lost call to br_fdb_fini() in br_init() error path X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=17efdd45755c0eb8d1418a1368ef7c7ebbe98c6e;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [BRIDGE]: Lost call to br_fdb_fini() in br_init() error path 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 Signed-off-by: Herbert Xu --- diff --git a/net/bridge/br.c b/net/bridge/br.c index 93867bb6cc97..a90182873120 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: err_out2: br_netfilter_fini(); err_out1: + br_fdb_fini(); +err_out: llc_sap_put(br_stp_sap); return err; }