Commit 4b4749b7 authored by Sayooj K Karun's avatar Sayooj K Karun Committed by Jakub Kicinski
Browse files

net: atm: fix incorrect cleanup function call in error path



In atm_init(), if atmsvc_init() fails, the code jumps to out_atmpvc_exit
label which incorrectly calls atmsvc_exit() instead of atmpvc_exit().
This results in calling the wrong cleanup function and failing to properly
clean up atmpvc_init().

Fix this by calling atmpvc_exit() in the out_atmpvc_exit error path.

Fixes: 1da177e4 ("Linux-2.6.12-rc2")
Signed-off-by: default avatarSayooj K Karun <sayooj@aerlync.com>
Link: https://patch.msgid.link/20251119085747.67139-1-sayooj@aerlync.com


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 8e621c9a
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -881,7 +881,7 @@ static int __init atm_init(void)
out_atmsvc_exit:
	atmsvc_exit();
out_atmpvc_exit:
	atmsvc_exit();
	atmpvc_exit();
out_unregister_vcc_proto:
	proto_unregister(&vcc_proto);
	goto out;