* [PATCH][SOCK] on failure free the sock from the right place
@ 2005-04-19 4:59 Arnaldo Carvalho de Melo
0 siblings, 0 replies; only message in thread
From: Arnaldo Carvalho de Melo @ 2005-04-19 4:59 UTC (permalink / raw)
To: davem; +Cc: netdev, Andrew Morton
Hi Dave,
Please apply.
Best Regards,
- Arnaldo
------------------------------------------------------------------------
Author: acme
Date: 2005-04-19 01:53:49 -0300 (Tue, 19 Apr 2005)
New Revision: 68
Modified:
trunk/net/core/sock.c
Log:
[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>
Modified: trunk/net/core/sock.c
===================================================================
--- trunk/net/core/sock.c 2005-04-19 02:32:15 UTC (rev 67)
+++ trunk/net/core/sock.c 2005-04-19 04:53:49 UTC (rev 68)
@@ -642,7 +642,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);
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2005-04-19 4:59 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-04-19 4:59 [PATCH][SOCK] on failure free the sock from the right place Arnaldo Carvalho de Melo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).