]> granicus.if.org Git - apache/commitdiff
PR 42572: crash in Windows MPM
authorNick Kew <niq@apache.org>
Tue, 7 Aug 2007 13:01:53 +0000 (13:01 +0000)
committerNick Kew <niq@apache.org>
Tue, 7 Aug 2007 13:01:53 +0000 (13:01 +0000)
Davi Arnauts simple patch confirmed as working.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@563487 13f79535-47bb-0310-9956-ffa450edef68

server/mpm/winnt/child.c

index 6b15d6de4cc4bcc5f9a5e2bcb0c73327079db91b..86d12babc0be946ff9a20db6dca568e380c07479 100644 (file)
@@ -1184,7 +1184,9 @@ void child_main(apr_pool_t *pconf)
         TerminateThread(child_handles[i], 1);
         CloseHandle(child_handles[i]);
         /* Reset the scoreboard entry for the thread we just whacked */
-        score_idx = apr_hash_get(ht, &child_handles[i], sizeof(HANDLE));
+        if (score_idx) {
+            score_idx = apr_hash_get(ht, &child_handles[i], sizeof(HANDLE));
+        }
         ap_update_child_status_from_indexes(0, *score_idx, SERVER_DEAD, NULL);
     }
     ap_log_error(APLOG_MARK, APLOG_NOTICE, APR_SUCCESS, ap_server_conf,