Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 87b30a65 authored by Benjamin Thery's avatar Benjamin Thery Committed by David S. Miller
Browse files

ipv6: fix ip6_mr_init error path



The order of cleanup operations in the error/exit section of ip6_mr_init()
is completely inversed. It should be the other way around.
Also a del_timer() is missing in the error path.

Signed-off-by: default avatarBenjamin Thery <benjamin.thery@bull.net>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 1207e795
Loading
Loading
Loading
Loading
+5 −4
Original line number Original line Diff line number Diff line
@@ -981,14 +981,15 @@ int __init ip6_mr_init(void)
		goto proc_cache_fail;
		goto proc_cache_fail;
#endif
#endif
	return 0;
	return 0;
reg_notif_fail:
	kmem_cache_destroy(mrt_cachep);
#ifdef CONFIG_PROC_FS
#ifdef CONFIG_PROC_FS
proc_vif_fail:
	unregister_netdevice_notifier(&ip6_mr_notifier);
proc_cache_fail:
proc_cache_fail:
	proc_net_remove(&init_net, "ip6_mr_vif");
	proc_net_remove(&init_net, "ip6_mr_vif");
proc_vif_fail:
	unregister_netdevice_notifier(&ip6_mr_notifier);
#endif
#endif
reg_notif_fail:
	del_timer(&ipmr_expire_timer);
	kmem_cache_destroy(mrt_cachep);
	return err;
	return err;
}
}