summaryrefslogtreecommitdiffstats
path: root/arch/um/drivers/daemon_user.c
diff options
context:
space:
mode:
authorPaolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>2005-11-13 16:07:14 -0800
committerLinus Torvalds <torvalds@g5.osdl.org>2005-11-13 18:14:15 -0800
commitba260e23efbabcff975f60401475c2bdd693f872 (patch)
tree61b78237e116abd22d15b4886c0e08f6bc63d243 /arch/um/drivers/daemon_user.c
parent7a590611c0f1e1302c58fdfdc958f2d6bdddd78a (diff)
downloadblackbird-op-linux-ba260e23efbabcff975f60401475c2bdd693f872.tar.gz
blackbird-op-linux-ba260e23efbabcff975f60401475c2bdd693f872.zip
[PATCH] uml: fix daemon transport exit path bug
Fix some exit path bugs in the daemon driver. Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Acked-by: Jeff Dike <jdike@addtoit.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/um/drivers/daemon_user.c')
-rw-r--r--arch/um/drivers/daemon_user.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/um/drivers/daemon_user.c b/arch/um/drivers/daemon_user.c
index c1b03f7c1daa..1bb085b2824d 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 daemon_data *pri)
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 daemon_data *pri)
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:
OpenPOWER on IntegriCloud