[asterisk-commits] tilghman: trunk r191211 - /trunk/main/pbx.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Apr 29 17:23:41 CDT 2009


Author: tilghman
Date: Wed Apr 29 17:23:27 2009
New Revision: 191211

URL: http://svn.digium.com/svn-view/asterisk?view=rev&rev=191211
Log:
Part of the merge did not happen correctly, which resulted in a compile error

Modified:
    trunk/main/pbx.c

Modified: trunk/main/pbx.c
URL: http://svn.digium.com/svn-view/asterisk/trunk/main/pbx.c?view=diff&rev=191211&r1=191210&r2=191211
==============================================================================
--- trunk/main/pbx.c (original)
+++ trunk/main/pbx.c Wed Apr 29 17:23:27 2009
@@ -3605,7 +3605,7 @@
 						cp4 = ast_func_read2(c, finalvars, &substr3, 0) ? NULL : ast_str_buffer(substr3);
 						/* Don't deallocate the varshead that was passed in */
 						memcpy(&bogus->varshead, &old, sizeof(bogus->varshead));
-						ast_channel_free(bogus);
+						ast_channel_release(bogus);
 					} else {
 						ast_log(LOG_ERROR, "Unable to allocate bogus channel for variable substitution.  Function results may be blank.\n");
 					}
@@ -3694,7 +3694,7 @@
 void pbx_substitute_variables_helper_full(struct ast_channel *c, struct varshead *headp, const char *cp1, char *cp2, int count, size_t *used)
 {
 	/* Substitutes variables into cp2, based on string cp1, cp2 NO LONGER NEEDS TO BE ZEROED OUT!!!!  */
-	char *cp4;
+	char *cp4 = NULL;
 	const char *tmp, *whereweare, *orig_cp2 = cp2;
 	int length, offset, offset2, isfunction;
 	char *workspace = NULL;
@@ -3805,8 +3805,9 @@
 						/* Don't deallocate the varshead that was passed in */
 						memcpy(&bogus->varshead, &old, sizeof(bogus->varshead));
 						bogus = ast_channel_release(bogus);
-					} else
+					} else {
 						ast_log(LOG_ERROR, "Unable to allocate bogus channel for variable substitution.  Function results may be blank.\n");
+					}
 				}
 				ast_debug(2, "Function result is '%s'\n", cp4 ? cp4 : "(null)");
 			} else {




More information about the asterisk-commits mailing list