[asterisk-commits] trunk r32696 - /trunk/apps/app_followme.c
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Tue Jun 6 13:34:00 MST 2006
Author: bweschke
Date: Tue Jun 6 15:34:00 2006
New Revision: 32696
URL: http://svn.digium.com/view/asterisk?rev=32696&view=rev
Log:
Don't leak memory.
Modified:
trunk/apps/app_followme.c
Modified: trunk/apps/app_followme.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_followme.c?rev=32696&r1=32695&r2=32696&view=diff
==============================================================================
--- trunk/apps/app_followme.c (original)
+++ trunk/apps/app_followme.c Tue Jun 6 15:34:00 2006
@@ -264,8 +264,7 @@
if (cur) {
cur->timeout = timeout;
- if (strchr(number, ',')) {
- tmp = strchr(number, ',');
+ if ((tmp = strchr(number, ','))) {
*tmp = '\0';
}
ast_copy_string(cur->number, number, sizeof(cur->number));
@@ -634,6 +633,7 @@
tmpuser->state = 1;
} else {
ast_log(LOG_WARNING, "Unable to playback %s.\n", callfromname);
+ ast_frfree(f);
return NULL;
}
} else {
@@ -642,6 +642,7 @@
ast_sched_runq(tmpuser->ochan->sched);
else {
ast_log(LOG_WARNING, "Unable to playback %s.\n", tpargs->norecordingprompt);
+ ast_frfree(f);
return NULL;
}
}
@@ -709,12 +710,14 @@
if (!strcmp(tmpuser->yn, tpargs->takecall)) {
if (option_debug)
ast_log(LOG_DEBUG, "Match to take the call!\n");
+ ast_frfree(f);
return tmpuser->ochan;
}
if (!strcmp(tmpuser->yn, tpargs->nextindp)) {
if (option_debug)
ast_log(LOG_DEBUG, "Next in dial plan step requested.\n");
*status = 1;
+ ast_frfree(f);
return NULL;
}
More information about the asterisk-commits
mailing list