Skip to content

Commit

Permalink
[PATCH] uml: fix daemon transport exit path bug
Browse files Browse the repository at this point in the history
Fix some exit path bugs in the daemon driver.

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <[email protected]>
Acked-by: Jeff Dike <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Paolo 'Blaisorblade' Giarrusso authored and Linus Torvalds committed Nov 14, 2005
1 parent 7a59061 commit ba260e2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions arch/um/drivers/daemon_user.c
Original file line number Diff line number Diff line change
Expand Up @@ -98,20 +98,22 @@ 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));
if(n != sizeof(*sun)){
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:
Expand Down

0 comments on commit ba260e2

Please sign in to comment.