mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-14 08:31:02 +00:00
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: https://origsvn.digium.com/svn/asterisk/trunk@130854 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -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))
|
||||
|
Reference in New Issue
Block a user