projects
/
kernel
/
kernel-generic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ea3fb37
)
sock.c: potential null dereference
author
Dan Carpenter
<error27@gmail.com>
Sat, 6 Mar 2010 01:04:45 +0000
(
01:04
+0000)
committer
David S. Miller
<davem@davemloft.net>
Sun, 7 Mar 2010 23:25:50 +0000
(15:25 -0800)
We test that "prot->rsk_prot" is non-null right before we dereference it
on this line.
Signed-off-by: Dan Carpenter <error27@gmail.com>
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
61a65a2
..
c5812bb
100644
(file)
--- a/
net/core/sock.c
+++ b/
net/core/sock.c
@@
-2288,7
+2288,8
@@
out_free_request_sock_slab:
prot->rsk_prot->slab = NULL;
}
out_free_request_sock_slab_name:
- kfree(prot->rsk_prot->slab_name);
+ if (prot->rsk_prot)
+ kfree(prot->rsk_prot->slab_name);
out_free_sock_slab:
kmem_cache_destroy(prot->slab);
prot->slab = NULL;