[asterisk-commits] russell: branch 1.4 r51057 - /branches/1.4/main/config.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Mon Jan 15 18:15:45 MST 2007


Author: russell
Date: Mon Jan 15 19:15:44 2007
New Revision: 51057

URL: http://svn.digium.com/view/asterisk?view=rev&rev=51057
Log:
It is possible for the config pointer to be NULL here, so it needs to be
checked before dereferencing it.

Modified:
    branches/1.4/main/config.c

Modified: branches/1.4/main/config.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/main/config.c?view=diff&rev=51057&r1=51056&r2=51057
==============================================================================
--- branches/1.4/main/config.c (original)
+++ branches/1.4/main/config.c Mon Jan 15 19:15:44 2007
@@ -945,7 +945,7 @@
 		}
 #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;



More information about the asterisk-commits mailing list