public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Paolo 'Blaisorblade' Giarrusso" <blaisorblade@yahoo.it>
To: Linus Torvalds <torvalds@osdl.org>, Andrew Morton <akpm@osdl.org>
Cc: Jeff Dike <jdike@addtoit.com>,
	linux-kernel@vger.kernel.org,
	user-mode-linux-devel@lists.sourceforge.net
Subject: [PATCH 9/9] uml: fix daemon transport exit path bug
Date: Sat, 12 Nov 2005 19:08:03 +0100	[thread overview]
Message-ID: <20051112180801.20133.67833.stgit@zion.home.lan> (raw)
In-Reply-To: <20051112180711.20133.68166.stgit@zion.home.lan>

From: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>

Fix some exit path bugs in the daemon driver.

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
---

 arch/um/drivers/daemon_user.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/arch/um/drivers/daemon_user.c b/arch/um/drivers/daemon_user.c
index c1b03f7..1bb085b 100644
--- a/arch/um/drivers/daemon_user.c
+++ b/arch/um/drivers/daemon_user.c
@@ -98,7 +98,7 @@ static int connect_to_switch(struct daem
 		printk("daemon_open : control setup request failed, err = %d\n",
 		       -n);
 		err = -ENOTCONN;
-		goto out;		
+		goto out_free;
 	}
 
 	n = os_read_file(pri->control, sun, sizeof(*sun));
@@ -106,12 +106,14 @@ static int connect_to_switch(struct daem
 		printk("daemon_open : read of data socket failed, err = %d\n",
 		       -n);
 		err = -ENOTCONN;
-		goto out_close;		
+		goto out_free;
 	}
 
 	pri->data_addr = sun;
 	return(fd);
 
+ out_free:
+	kfree(sun);
  out_close:
 	os_close_file(fd);
  out:


  parent reply	other threads:[~2005-11-12 18:03 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-12 18:07 [PATCH 1/9] Kbuild: index asm-$(SUBARCH) headers for UML Paolo 'Blaisorblade' Giarrusso
2005-11-12 18:07 ` [PATCH 2/9] uml: remove bogus WARN_ON, triggerable harmlessly on a page fault race Paolo 'Blaisorblade' Giarrusso
2005-11-12 18:07 ` [PATCH 3/9] uml: micro fixups to arch Kconfig Paolo 'Blaisorblade' Giarrusso
2005-11-12 18:07 ` [PATCH 4/9] uml - fixups for "reuse i386 cpu-specific tuning" Paolo 'Blaisorblade' Giarrusso
2005-11-12 18:07 ` [PATCH 5/9] uml: fix mcast network driver error handling Paolo 'Blaisorblade' Giarrusso
2005-11-12 18:07 ` [PATCH 6/9] uml console channels: remove console_write wrappers Paolo 'Blaisorblade' Giarrusso
2005-11-12 18:07 ` [PATCH 7/9] uml console channels: fix the API of console_write Paolo 'Blaisorblade' Giarrusso
2005-11-12 18:07 ` [PATCH 8/9] Uml: fix access_ok Paolo 'Blaisorblade' Giarrusso
2005-11-12 18:08 ` Paolo 'Blaisorblade' Giarrusso [this message]
2005-11-12 22:20   ` [uml-devel] [PATCH 9/9] uml: fix daemon transport exit path bug Jeff Dike

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=20051112180801.20133.67833.stgit@zion.home.lan \
    --to=blaisorblade@yahoo.it \
    --cc=akpm@osdl.org \
    --cc=jdike@addtoit.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@osdl.org \
    --cc=user-mode-linux-devel@lists.sourceforge.net \
    /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