Commit 558724a5b2a73ad0c7638e21e8dffc419d267b6c
Committed by
Pablo Neira Ayuso
1 parent
130549fed8
netfilter: nfnetlink_queue: fix error return code in nfnetlink_queue_init()
Fix to return a negative error code from the error handling case instead of 0, as returned elsewhere in this function. Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Showing 1 changed file with 3 additions and 1 deletions Side-by-side Diff
net/netfilter/nfnetlink_queue_core.c
... | ... | @@ -1062,8 +1062,10 @@ |
1062 | 1062 | |
1063 | 1063 | #ifdef CONFIG_PROC_FS |
1064 | 1064 | if (!proc_create("nfnetlink_queue", 0440, |
1065 | - proc_net_netfilter, &nfqnl_file_ops)) | |
1065 | + proc_net_netfilter, &nfqnl_file_ops)) { | |
1066 | + status = -ENOMEM; | |
1066 | 1067 | goto cleanup_subsys; |
1068 | + } | |
1067 | 1069 | #endif |
1068 | 1070 | |
1069 | 1071 | register_netdevice_notifier(&nfqnl_dev_notifier); |