From 9277311f93db6fbd2059a2f221056697b9f93a0c Mon Sep 17 00:00:00 2001 From: Allan Nathanson <42244061+Allan-N@users.noreply.github.com> Date: Mon, 3 Mar 2025 09:53:02 -0500 Subject: [PATCH] config.c: #include of non-existent file should not crash Corrects a segmentation fault when a configuration file has a #include statement that referenced a file that does not exist. Resolves: https://github.com/asterisk/asterisk/issues/1139 --- main/config.c | 1 - 1 file changed, 1 deletion(-) diff --git a/main/config.c b/main/config.c index 71a51224a1..df67717e22 100644 --- a/main/config.c +++ b/main/config.c @@ -2246,7 +2246,6 @@ static int process_text_line(struct ast_config *cfg, struct ast_category **cat, } if (!result && (include_type != CONFIG_STATEMENT_TRYINCLUDE)) { ast_log(LOG_ERROR, "The file '%s' was listed as a #include but it does not exist.\n", cur); - ast_include_destroy(newinclude); return -1; }