diff options
author | mmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-07-14 22:24:01 +0000 |
---|---|---|
committer | mmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-07-14 22:24:01 +0000 |
commit | 99362a5199f1a61a61858bf47befea15b336be96 (patch) | |
tree | 3236ebc697e376a96404dbb0bd17006d5feeffbc /main/asterisk.c | |
parent | f816ed395ddc9f3d46b1010a2f813ee3e46c722a (diff) |
Merged revisions 130854 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
........
r130854 | mmichelson | 2008-07-14 17:22:57 -0500 (Mon, 14 Jul 2008) | 9 lines
Fix a memory leak in the case that /dev/null cannot be
opened when running startup commands from cli.conf
(closes issue #13066)
Reported by: eliel
Patches:
asterisk.c.patch uploaded by eliel (license 64)
........
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@130855 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/asterisk.c')
-rw-r--r-- | main/asterisk.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/main/asterisk.c b/main/asterisk.c index 2080f207d..80102120f 100644 --- a/main/asterisk.c +++ b/main/asterisk.c @@ -2845,8 +2845,10 @@ static void run_startup_commands(void) return; fd = open("/dev/null", O_RDWR); - if (fd < 0) + if (fd < 0) { + ast_config_destroy(cfg); return; + } for (v = ast_variable_browse(cfg, "startup_commands"); v; v = v->next) { if (ast_true(v->value)) |