Commit 80896a35 authored by Wei Yongjun's avatar Wei Yongjun Committed by David S. Miller

sctp: Correctly cleanup procfs entries upon failure.

This patch remove the proc fs entry which has been created if fail to
set up proc fs entry for the SCTP protocol.
Signed-off-by: default avatarWei Yongjun <yjwei@cn.fujitsu.com>
Acked-by: default avatarNeil Horman <nhorman@tuxdriver.com>
Signed-off-by: default avatarVlad Yasevich <vladislav.yasevich@hp.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 93653e04
......@@ -108,14 +108,23 @@ static __init int sctp_proc_init(void)
}
if (sctp_snmp_proc_init())
goto out_nomem;
goto out_snmp_proc_init;
if (sctp_eps_proc_init())
goto out_nomem;
goto out_eps_proc_init;
if (sctp_assocs_proc_init())
goto out_nomem;
goto out_assocs_proc_init;
return 0;
out_assocs_proc_init:
sctp_eps_proc_exit();
out_eps_proc_init:
sctp_snmp_proc_exit();
out_snmp_proc_init:
if (proc_net_sctp) {
proc_net_sctp = NULL;
remove_proc_entry("sctp", init_net.proc_net);
}
out_nomem:
return -ENOMEM;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment