Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ba260e23 authored by Paolo 'Blaisorblade' Giarrusso's avatar Paolo 'Blaisorblade' Giarrusso Committed by Linus Torvalds
Browse files

[PATCH] uml: fix daemon transport exit path bug



Fix some exit path bugs in the daemon driver.

Signed-off-by: default avatarPaolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Acked-by: default avatarJeff Dike <jdike@addtoit.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 7a590611
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -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: