projects
/
firefly-linux-kernel-4.4.55.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Merge branch 'for-3.18-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj...
[firefly-linux-kernel-4.4.55.git]
/
net
/
core
/
sock.c
diff --git
a/net/core/sock.c
b/net/core/sock.c
index b4f3ea2fce60cbb72d90434ad97ca26d682135a9..15e0c67b1069654af22ad9afe5c993cbcaafaec5 100644
(file)
--- a/
net/core/sock.c
+++ b/
net/core/sock.c
@@
-1718,6
+1718,8
@@
EXPORT_SYMBOL(sock_kmalloc);
*/
void sock_kfree_s(struct sock *sk, void *mem, int size)
{
+ if (WARN_ON_ONCE(!mem))
+ return;
kfree(mem);
atomic_sub(size, &sk->sk_omem_alloc);
}