OSDN Git Service
(root)
/
uclinux-h8
/
linux.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
|
history
diff --git
a/net/core/sock.c
b/net/core/sock.c
index
f52c87a
..
4df4fa3
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);