Guard non-initialization.
authorcantor <cantor@cb58f699-b61c-0410-a6fe-9272a202ed29>
Tue, 12 Jun 2007 15:35:31 +0000 (15:35 +0000)
committercantor <cantor@cb58f699-b61c-0410-a6fe-9272a202ed29>
Tue, 12 Jun 2007 15:35:31 +0000 (15:35 +0000)
git-svn-id: https://svn.middleware.georgetown.edu/cpp-sp/trunk@2311 cb58f699-b61c-0410-a6fe-9272a202ed29

apache/mod_apache.cpp

index 36a26ea..95a94fa 100644 (file)
@@ -1078,11 +1078,12 @@ extern "C" apr_status_t shib_child_exit(void* data)
 {
   server_rec* s = NULL;
 #endif
-
-    ap_log_error(APLOG_MARK,APLOG_DEBUG|APLOG_NOERRNO,SH_AP_R(s),"shib_child_exit(%d) dealing with g_Config..", (int)getpid());
-    g_Config->term();
-    g_Config = NULL;
-    ap_log_error(APLOG_MARK,APLOG_DEBUG|APLOG_NOERRNO,SH_AP_R(s),"shib_child_exit() done");
+    if (g_Config) {
+        ap_log_error(APLOG_MARK,APLOG_DEBUG|APLOG_NOERRNO,SH_AP_R(s),"shib_child_exit(%d) dealing with g_Config..", (int)getpid());
+        g_Config->term();
+        g_Config = NULL;
+        ap_log_error(APLOG_MARK,APLOG_DEBUG|APLOG_NOERRNO,SH_AP_R(s),"shib_child_exit() done");
+    }
 
 #ifndef SHIB_APACHE_13
     return OK;