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));
tmpuser->state = 1;
} else {
ast_log(LOG_WARNING, "Unable to playback %s.\n", callfromname);
+ ast_frfree(f);
return NULL;
}
} else {
ast_sched_runq(tmpuser->ochan->sched);
else {
ast_log(LOG_WARNING, "Unable to playback %s.\n", tpargs->norecordingprompt);
+ ast_frfree(f);
return NULL;
}
}
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;
}