[asterisk-commits] qwell: branch 1.4 r90876 - /branches/1.4/main/channel.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Dec 4 11:28:08 CST 2007


Author: qwell
Date: Tue Dec  4 11:28:08 2007
New Revision: 90876

URL: http://svn.digium.com/view/asterisk?view=rev&rev=90876
Log:
If we fail to create a channel after allocating a timing fd, we need to make sure to close it.

Issue 11454, patch by eliel.

Modified:
    branches/1.4/main/channel.c

Modified: branches/1.4/main/channel.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/main/channel.c?view=diff&rev=90876&r1=90875&r2=90876
==============================================================================
--- branches/1.4/main/channel.c (original)
+++ branches/1.4/main/channel.c Tue Dec  4 11:28:08 2007
@@ -776,6 +776,10 @@
 	if (needqueue) {
 		if (pipe(tmp->alertpipe)) {
 			ast_log(LOG_WARNING, "Channel allocation failed: Can't create alert pipe!\n");
+#ifdef HAVE_ZAPTEL
+			if (tmp->timingfd > -1)
+				close(tmp->timingfd);
+#endif
 			sched_context_destroy(tmp->sched);
 			ast_string_field_free_memory(tmp);
 			free(tmp);




More information about the asterisk-commits mailing list