aboutsummaryrefslogtreecommitdiffstats
path: root/arch/um
diff options
context:
space:
mode:
authorPaolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>2005-11-13 19:07:14 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2005-11-13 21:14:15 -0500
commitba260e23efbabcff975f60401475c2bdd693f872 (patch)
tree61b78237e116abd22d15b4886c0e08f6bc63d243 /arch/um
parent7a590611c0f1e1302c58fdfdc958f2d6bdddd78a (diff)
[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')
-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)
98 printk("daemon_open : control setup request failed, err = %d\n", 98 printk("daemon_open : control setup request failed, err = %d\n",
99 -n); 99 -n);
100 err = -ENOTCONN; 100 err = -ENOTCONN;
101 goto out; 101 goto out_free;
102 } 102 }
103 103
104 n = os_read_file(pri->control, sun, sizeof(*sun)); 104 n = os_read_file(pri->control, sun, sizeof(*sun));
@@ -106,12 +106,14 @@ static int connect_to_switch(struct daemon_data *pri)
106 printk("daemon_open : read of data socket failed, err = %d\n", 106 printk("daemon_open : read of data socket failed, err = %d\n",
107 -n); 107 -n);
108 err = -ENOTCONN; 108 err = -ENOTCONN;
109 goto out_close; 109 goto out_free;
110 } 110 }
111 111
112 pri->data_addr = sun; 112 pri->data_addr = sun;
113 return(fd); 113 return(fd);
114 114
115 out_free:
116 kfree(sun);
115 out_close: 117 out_close:
116 os_close_file(fd); 118 os_close_file(fd);
117 out: 119 out: