diff --git a/main/config.c b/main/config.c index f90cfc1638..0ff2d841e9 100644 --- a/main/config.c +++ b/main/config.c @@ -1493,6 +1493,9 @@ static struct ast_config *config_text_file_load(const char *database, const char AST_LIST_UNLOCK(&cfmtime_head); ast_free(comment_buffer); ast_free(lline_buffer); +#ifdef AST_INCLUDE_GLOB + globfree(&globbuf); +#endif return CONFIG_STATUS_FILEUNCHANGED; } } @@ -1503,6 +1506,9 @@ static struct ast_config *config_text_file_load(const char *database, const char if (cfg == NULL) { ast_free(comment_buffer); ast_free(lline_buffer); +#ifdef AST_INCLUDE_GLOB + globfree(&globbuf); +#endif return NULL; }