Skip to contentSkip to conversation

UML - Fix error cleanup ordering

PATCH New Jeff Dike 1 participant 1 message Jul 30, 2007 User-mode Linux (UML)

lore
Share & tools
lore

Jeff Dike

author
#0 lore raw

PATCH 3/4 UML - Fix error cleanup ordering

I messed up the error cleanup ordering in the console port driver.

--

 arch/um/drivers/port_kern.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/um/drivers/port_kern.c +2 -2
Index: linux-2.6.21-mm/arch/um/drivers/port_kern.c
===================================================================
@@ -216,10 +216,10 @@ void *port_data(int port_num)
 				    .telnetd_pid  	= -1 });
 	goto out;
 
- out_free:
-	kfree(port);
  out_close:
 	os_close_file(fd);
+ out_free:
+	kfree(port);
  out:
 	up(&ports_sem);
 	return dev;