From de14e3d549af269a18f600c18ebbda78fe37c132 Mon Sep 17 00:00:00 2001 From: Russell Bryant Date: Tue, 16 Jan 2007 01:15:44 +0000 Subject: [PATCH] It is possible for the config pointer to be NULL here, so it needs to be checked before dereferencing it. git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@51057 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- main/config.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main/config.c b/main/config.c index 7a47ffd19b..aa74f5b301 100644 --- a/main/config.c +++ b/main/config.c @@ -945,7 +945,7 @@ static struct ast_config *config_text_file_load(const char *database, const char } #endif - if (cfg->include_level == 1 && withcomments && comment_buffer) { + if (cfg && cfg->include_level == 1 && withcomments && comment_buffer) { free(comment_buffer); free(lline_buffer); comment_buffer = NULL;