From: Terry Wilson Date: Fri, 9 Jan 2009 20:25:25 +0000 (+0000) Subject: Don't leak memory if phoneprov.conf does not exist X-Git-Tag: 1.6.2.0-beta1~479 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=87318da8ea3a7aeffbc57fffdbcff3dda2851f43;p=thirdparty%2Fasterisk.git 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 --- diff --git a/res/res_phoneprov.c b/res/res_phoneprov.c index b05240ac8f..d71139e134 100644 --- a/res/res_phoneprov.c +++ b/res/res_phoneprov.c @@ -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; }