aboutsummaryrefslogtreecommitdiffstats
path: root/apps/app_followme.c
diff options
context:
space:
mode:
authorbweschke <bweschke@f38db490-d61c-443f-a65b-d21fe96a405b>2006-06-06 20:34:00 +0000
committerbweschke <bweschke@f38db490-d61c-443f-a65b-d21fe96a405b>2006-06-06 20:34:00 +0000
commitfb5889cdc444d2b31038d13197798f67c7d1bdf1 (patch)
treef556afcfe78732991dd0f94bdd7ac90d08216f9c /apps/app_followme.c
parente85baffa295f17e3ae2246ef44a6017feef4c876 (diff)
Don't leak memory.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@32696 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_followme.c')
-rw-r--r--apps/app_followme.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/apps/app_followme.c b/apps/app_followme.c
index 96db7de7b..5e71cc335 100644
--- a/apps/app_followme.c
+++ b/apps/app_followme.c
@@ -264,8 +264,7 @@ static struct number *create_followme_number(char *number, int timeout, int numo
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 @@ static struct ast_channel *wait_for_winner(struct findme_user_listptr *findme_us
tmpuser->state = 1;
} else {
ast_log(LOG_WARNING, "Unable to playback %s.\n", callfromname);
+ ast_frfree(f);
return NULL;
}
} else {
@@ -642,6 +642,7 @@ static struct ast_channel *wait_for_winner(struct findme_user_listptr *findme_us
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 @@ static struct ast_channel *wait_for_winner(struct findme_user_listptr *findme_us
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;
}