[asterisk-commits] russell: trunk r66077 - in /trunk: ./ main/channel.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Thu May 24 15:25:55 MST 2007


Author: russell
Date: Thu May 24 17:25:55 2007
New Revision: 66077

URL: http://svn.digium.com/view/asterisk?view=rev&rev=66077
Log:
Merged revisions 66076 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r66076 | russell | 2007-05-24 17:23:59 -0500 (Thu, 24 May 2007) | 1 line

if the string field init fails, clean up the stuff that was allocated already
........

Modified:
    trunk/   (props changed)
    trunk/main/channel.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.

Modified: trunk/main/channel.c
URL: http://svn.digium.com/view/asterisk/trunk/main/channel.c?view=diff&rev=66077&r1=66076&r2=66077
==============================================================================
--- trunk/main/channel.c (original)
+++ trunk/main/channel.c Thu May 24 17:25:55 2007
@@ -652,8 +652,11 @@
 		return NULL;
 	}
 	
-	if ((ast_string_field_init(tmp, 128)))
+	if ((ast_string_field_init(tmp, 128))) {
+		sched_context_destroy(tmp->sched);
+		free(tmp);
 		return NULL;
+	}
 
 	/* Don't bother initializing the last two FD here, because they
 	   will *always* be set just a few lines down (AST_TIMING_FD,



More information about the asterisk-commits mailing list