diff options
author | mmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-07-14 22:22:57 +0000 |
---|---|---|
committer | mmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-07-14 22:22:57 +0000 |
commit | 3dddaa38d96ebad9e2a5a343000e425301ab08d4 (patch) | |
tree | ec42104115c138346f2da4fc681af1c66ae58952 /main/asterisk.c | |
parent | 50b7e1e02eb7f5817f290b0fbf0781d8d65ce522 (diff) |
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/trunk@130854 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 c836611fc..2cad4805f 100644 --- a/main/asterisk.c +++ b/main/asterisk.c @@ -2881,8 +2881,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)) |