netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: acme@ghostprotocols.net (Arnaldo Carvalho de Melo)
To: davem@davemloft.net
Cc: netdev@oss.sgi.com, Andrew Morton <akpm@osdl.org>
Subject: [PATCH][SOCK] on failure free the sock from the right place
Date: Tue, 19 Apr 2005 01:59:14 -0300	[thread overview]
Message-ID: <20050419045914.GD9433@conectiva.com.br> (raw)

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);

                 reply	other threads:[~2005-04-19  4:59 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050419045914.GD9433@conectiva.com.br \
    --to=acme@ghostprotocols.net \
    --cc=akpm@osdl.org \
    --cc=davem@davemloft.net \
    --cc=netdev@oss.sgi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).