comparison src/core/ngx_cycle.c @ 1165:efb7d84db340

fix segfault when *) perl was built without multiplicity *) when configuration was invalid
author Igor Sysoev <igor@sysoev.ru>
date Wed, 18 Apr 2007 11:28:11 +0000
parents 01884449985f
children e584e946e198
comparison
equal deleted inserted replaced
1164:d201e0461c3c 1165:efb7d84db340
52 ngx_shm_zone_t *shm_zone, *oshm_zone; 52 ngx_shm_zone_t *shm_zone, *oshm_zone;
53 ngx_slab_pool_t *shpool; 53 ngx_slab_pool_t *shpool;
54 ngx_list_part_t *part, *opart; 54 ngx_list_part_t *part, *opart;
55 ngx_open_file_t *file; 55 ngx_open_file_t *file;
56 ngx_listening_t *ls, *nls; 56 ngx_listening_t *ls, *nls;
57 ngx_core_conf_t *ccf; 57 ngx_core_conf_t *ccf, *old_ccf;
58 ngx_core_module_t *module; 58 ngx_core_module_t *module;
59 #if !(WIN32)
60 ngx_core_conf_t *old_ccf;
61 #endif
62 59
63 log = old_cycle->log; 60 log = old_cycle->log;
64 61
65 pool = ngx_create_pool(NGX_CYCLE_POOL_SIZE, log); 62 pool = ngx_create_pool(NGX_CYCLE_POOL_SIZE, log);
66 if (pool == NULL) { 63 if (pool == NULL) {
744 741
745 return cycle; 742 return cycle;
746 743
747 744
748 failed: 745 failed:
746
747 if (!ngx_is_init_cycle(old_cycle)) {
748 old_ccf = (ngx_core_conf_t *) ngx_get_conf(old_cycle->conf_ctx,
749 ngx_core_module);
750 if (old_ccf->environment) {
751 environ = old_ccf->environment;
752 }
753 }
749 754
750 /* rollback the new cycle configuration */ 755 /* rollback the new cycle configuration */
751 756
752 part = &cycle->open_files.part; 757 part = &cycle->open_files.part;
753 file = part->elts; 758 file = part->elts;