Don't leak memory if phoneprov.conf does not exist

(closes issue #14203)
Reported by: jamesgolovich
Patches: 
      asterisk-phoneprovleak.diff.txt uploaded by jamesgolovich (license 176)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@168142 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Terry Wilson 2009-01-09 20:25:25 +00:00
parent 4a9e8078b9
commit 87318da8ea
1 changed files with 1 additions and 0 deletions

View File

@ -944,6 +944,7 @@ static int set_config(void)
if (!(phoneprov_cfg = ast_config_load("phoneprov.conf", config_flags)) || phoneprov_cfg == CONFIG_STATUS_FILEINVALID) {
ast_log(LOG_ERROR, "Unable to load config phoneprov.conf\n");
ast_config_destroy(cfg);
return -1;
}