Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

[SOCK]: on failure free the sock from the right place

Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Arnaldo Carvalho de Melo and committed by
David S. Miller
88a66858 9c2b3328

+4 -1
+4 -1
net/core/sock.c
··· 641 641 } 642 642 643 643 if (security_sk_alloc(sk, family, priority)) { 644 - kmem_cache_free(slab, sk); 644 + if (slab != NULL) 645 + kmem_cache_free(slab, sk); 646 + else 647 + kfree(sk); 645 648 sk = NULL; 646 649 } else 647 650 __module_get(prot->owner);