tree 0ed43178152af4eff13943540aa7e4ec9f3658fb parent 9c2b3328f74800bb370d08bb3a4255d5fe833e94 author Arnaldo Carvalho de Melo <[EMAIL PROTECTED]> Wed, 20 Apr 2005 12:41:54 -0700 committer David S. Miller <[EMAIL PROTECTED]> Wed, 20 Apr 2005 12:41:54 -0700
[SOCK]: on failure free the sock from the right place Signed-off-by: Arnaldo Carvalho de Melo <[EMAIL PROTECTED]> Signed-off-by: David S. Miller <[EMAIL PROTECTED]> core/sock.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletion(-) Index: net/core/sock.c =================================================================== --- 9d3092a44b592a091c4818a20bd678d1191f7a88/net/core/sock.c (mode:100644 sha1:f52c87a9268a772398e937a80730d576ab32a066) +++ 0ed43178152af4eff13943540aa7e4ec9f3658fb/net/core/sock.c (mode:100644 sha1:4df4fa3c5de047e3ee099b64b38c4948b2dd406a) @@ -641,7 +641,10 @@ } 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); - To unsubscribe from this list: send the line "unsubscribe bk-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html