projects
/
GitHub
/
LineageOS
/
G12
/
android_kernel_amlogic_linux-4.9.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
eb9f370
)
sctp: add a checking for sctp_sysctl_net_register
author
wangweidong
<wangweidong1@huawei.com>
Thu, 8 May 2014 12:55:02 +0000
(20:55 +0800)
committer
David S. Miller
<davem@davemloft.net>
Fri, 9 May 2014 20:41:09 +0000
(16:41 -0400)
When register_net_sysctl failed, we should free the
sysctl_table.
Signed-off-by: Wang Weidong <wangweidong1@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sctp/sysctl.c
patch
|
blob
|
blame
|
history
diff --git
a/net/sctp/sysctl.c
b/net/sctp/sysctl.c
index ee80eb45799d6eeae910f6ce15fadfa1be0966f9..7e5eb75549902eeeb2c0c0889daca8ee53317ccf 100644
(file)
--- a/
net/sctp/sysctl.c
+++ b/
net/sctp/sysctl.c
@@
-447,6
+447,10
@@
int sctp_sysctl_net_register(struct net *net)
table[i].data += (char *)(&net->sctp) - (char *)&init_net.sctp;
net->sctp.sysctl_header = register_net_sysctl(net, "net/sctp", table);
+ if (net->sctp.sysctl_header == NULL) {
+ kfree(table);
+ return -ENOMEM;
+ }
return 0;
}