diff src/core/ngx_cycle.c @ 607:77cdfe394a94 release-0.3.25

nginx-0.3.25-RELEASE import *) Bugfix: the segmentation fault was occurred on start or while reconfiguration if there was invalid configuration; the bug had appeared in 0.3.24.
author Igor Sysoev <igor@sysoev.ru>
date Wed, 01 Feb 2006 20:01:51 +0000
parents 5dac8c7fb71b
children 3f8a2132b93d
line wrap: on
line diff
--- a/src/core/ngx_cycle.c
+++ b/src/core/ngx_cycle.c
@@ -613,7 +613,10 @@ ngx_init_cycle(ngx_cycle_t *old_cycle)
 static void
 ngx_destroy_cycle_pools(ngx_conf_t *conf)
 {
-    ngx_shm_free(&conf->cycle->shm);
+    if (conf->cycle->shm.addr) {
+        ngx_shm_free(&conf->cycle->shm);
+    }
+
     ngx_destroy_pool(conf->temp_pool);
     ngx_destroy_pool(conf->pool);
 }