diff common-channel.c @ 944:2e402a09e21e

Avoid use-after-free when channel inithandler fails. Thanks to Coverity
author Matt Johnston <matt@ucc.asn.au>
date Sat, 26 Jul 2014 10:18:55 +0800
parents 5daedffd0769
children 36eacc322e00
line wrap: on
line diff
--- a/common-channel.c	Fri Jul 25 22:22:39 2014 +0800
+++ b/common-channel.c	Sat Jul 26 10:18:55 2014 +0800
@@ -1089,6 +1089,7 @@
 		if (ret > 0) {
 			remove_channel(channel);
 			TRACE(("inithandler returned failure %d", ret))
+			return;
 		}
 	}