aboutsummaryrefslogtreecommitdiffstats
path: root/pbx
diff options
context:
space:
mode:
authormurf <murf@f38db490-d61c-443f-a65b-d21fe96a405b>2007-11-07 21:40:28 +0000
committermurf <murf@f38db490-d61c-443f-a65b-d21fe96a405b>2007-11-07 21:40:28 +0000
commitdde854a898e66e6204240bd0e1aa4284c37489cf (patch)
tree32a9c5d29da166eb54c0a9c5f94cd292918d2f3d /pbx
parent1403c9173337ce4ac6ab0dd83158d0101a15bc39 (diff)
In response to 10578, I just ran 1.4 thru valgrind; some of the config leakage I've already fixed, but it doesn't hurt to double check. I found and fixed leaks in res_jabber, cdr_tds, pbx_ael. Nothing major, tho.
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@89088 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'pbx')
-rw-r--r--pbx/pbx_ael.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/pbx/pbx_ael.c b/pbx/pbx_ael.c
index 1a53c744b..2af624c4f 100644
--- a/pbx/pbx_ael.c
+++ b/pbx/pbx_ael.c
@@ -2993,7 +2993,7 @@ static void gen_prios(struct ael_extension *exten, char *label, pval *statement,
strncat(buf2,strp2+1, sizeof(buf2)-strlen(strp2+1)-2);
strcat(buf2,"]");
for_init->appargs = strdup(buf2);
- for_init->app = strdup("Set");
+ /* for_init->app = strdup("Set"); just set! */
} else {
strp2 = p->u1.for_init;
while (*strp2 && isspace(*strp2))
@@ -3015,7 +3015,8 @@ static void gen_prios(struct ael_extension *exten, char *label, pval *statement,
*strp3 = 0; /* remove the closing paren */
for_init->appargs = strdup(buf2);
-
+ if (for_init->app)
+ free(for_init->app);
for_init->app = strdup("Macro");
} else { /* must be a regular app call */
char *strp3;
@@ -3023,6 +3024,8 @@ static void gen_prios(struct ael_extension *exten, char *label, pval *statement,
strp3 = strchr(buf2,'(');
if (strp3) {
*strp3 = 0;
+ if (for_init->app)
+ free(for_init->app);
for_init->app = strdup(buf2);
for_init->appargs = strdup(strp3+1);
strp3 = strrchr(for_init->appargs, ')');