diff options
author | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2005-08-29 16:08:53 +0000 |
---|---|---|
committer | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2005-08-29 16:08:53 +0000 |
commit | f183317737da7528c96a05ff3804988a555791da (patch) | |
tree | cd4b54b3482d1bc6325a4db37486f35472fd700f /apps | |
parent | add83c2ba650434c514d60324d3143c717f5eccb (diff) |
fix mem leak from not destrying config (issue #5048)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@6432 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps')
-rwxr-xr-x | apps/app_voicemail.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c index ed07f01d9..4a2876e55 100755 --- a/apps/app_voicemail.c +++ b/apps/app_voicemail.c @@ -1187,7 +1187,7 @@ static int store_file(char *dir, char *mailboxuser, char *mailboxcontext, int ms snprintf(sql, sizeof(sql), "INSERT INTO %s (dir,msgnum,recording,context,macrocontext,callerid,origtime,duration,mailboxuser,mailboxcontext) VALUES (?,?,?,?,?,?,?,?,?,?)",odbc_table); #else snprintf(sql, sizeof(sql), "INSERT INTO %s (dir,msgnum,recording,context,macrocontext,callerid,origtime,duration) VALUES (?,?,?,?,?,?,?,?)",odbc_table); -#endif +#endif res = SQLPrepare(stmt, sql, SQL_NTS); if ((res != SQL_SUCCESS) && (res != SQL_SUCCESS_WITH_INFO)) { ast_log(LOG_WARNING, "SQL Prepare failed![%s]\n", sql); @@ -6134,6 +6134,7 @@ static int load_config(void) } } ast_mutex_unlock(&vmlock); + ast_config_destroy(cfg); return 0; } else { ast_mutex_unlock(&vmlock); |