All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drivers/tty/serial: avoid double free after call ioc4_serial_remove_one
@ 2012-12-26 10:06 Chen Gang
  2013-01-10  8:03 ` Chen Gang
  0 siblings, 1 reply; 2+ messages in thread
From: Chen Gang @ 2012-12-26 10:06 UTC (permalink / raw)
  To: alan; +Cc: linux-serial


  before goto out5,  soft, control, serial are all assigned to idd
  after finish call ioc4_serial_remove_one, all resources are released
  we need return instead of go on, or double free

Signed-off-by: Chen Gang <gang.chen@asianux.com>
---
 drivers/tty/serial/ioc4_serial.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/tty/serial/ioc4_serial.c b/drivers/tty/serial/ioc4_serial.c
index 3e7da10..c4e30b8 100644
--- a/drivers/tty/serial/ioc4_serial.c
+++ b/drivers/tty/serial/ioc4_serial.c
@@ -2883,6 +2883,7 @@ ioc4_serial_attach_one(struct ioc4_driver_data *idd)
 	/* error exits that give back resources */
 out5:
 	ioc4_serial_remove_one(idd);
+	return ret;
 out4:
 	kfree(soft);
 out3:
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-01-10  8:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-26 10:06 [PATCH] drivers/tty/serial: avoid double free after call ioc4_serial_remove_one Chen Gang
2013-01-10  8:03 ` Chen Gang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.