Fix 2 memory leaks

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3844 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
James Golovich 2004-09-27 05:06:22 +00:00
parent efd42d2d5c
commit 2fc5fed79e
2 changed files with 2 additions and 1 deletions

View File

@ -817,7 +817,7 @@ static int load_config(void)
strncpy(db_family, p, sizeof(db_family) - 1); strncpy(db_family, p, sizeof(db_family) - 1);
db_family[sizeof(db_family) - 1] = '\0'; db_family[sizeof(db_family) - 1] = '\0';
} }
ast_destroy(cfg);
} }
return 0; return 0;

View File

@ -305,6 +305,7 @@ static int festival_exec(struct ast_channel *chan, void *vdata)
if (!(festivalcommand = ast_variable_retrieve(cfg, "general", "festivalcommand"))) { if (!(festivalcommand = ast_variable_retrieve(cfg, "general", "festivalcommand"))) {
festivalcommand = "(tts_textasterisk \"%s\" 'file)(quit)\n"; festivalcommand = "(tts_textasterisk \"%s\" 'file)(quit)\n";
} }
ast_destroy(cfg);
if (!vdata || ast_strlen_zero(vdata)) { if (!vdata || ast_strlen_zero(vdata)) {
ast_log(LOG_WARNING, "festival requires an argument (text)\n"); ast_log(LOG_WARNING, "festival requires an argument (text)\n");
return -1; return -1;