aboutsummaryrefslogtreecommitdiffstats
path: root/main/config.c
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2007-01-16 01:15:44 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2007-01-16 01:15:44 +0000
commitc6a4c50e851f4ab23bebcad1b5237b2946c83e33 (patch)
tree29cd9b2aecbf2b995a5b6a626d64a6af3fa6c60e /main/config.c
parentfd608ff6f07f8e0ca0f20567f03949e9caca1602 (diff)
It is possible for the config pointer to be NULL here, so it needs to be
checked before dereferencing it. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@51057 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/config.c')
-rw-r--r--main/config.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/main/config.c b/main/config.c
index 7a47ffd19..aa74f5b30 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;