projects
/
GitHub
/
LineageOS
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9c2b332
)
[SOCK]: on failure free the sock from the right place
author
Arnaldo Carvalho de Melo
<acme@ghostprotocols.net>
Wed, 20 Apr 2005 05:41:54 +0000
(22:41 -0700)
committer
David S. Miller
<davem@davemloft.net>
Wed, 20 Apr 2005 05:41:54 +0000
(22:41 -0700)
Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/sock.c
patch
|
blob
|
blame
|
history
diff --git
a/net/core/sock.c
b/net/core/sock.c
index f52c87a9268a772398e937a80730d576ab32a066..4df4fa3c5de047e3ee099b64b38c4948b2dd406a 100644
(file)
--- a/
net/core/sock.c
+++ b/
net/core/sock.c
@@
-641,7
+641,10
@@
struct sock *sk_alloc(int family, int priority, struct proto *prot, int zero_it)
}
if (security_sk_alloc(sk, family, priority)) {
- kmem_cache_free(slab, sk);
+ if (slab != NULL)
+ kmem_cache_free(slab, sk);
+ else
+ kfree(sk);
sk = NULL;
} else
__module_get(prot->owner);