Klaus Demo nginx / 11864a7
fix the previous commit Igor Sysoev 11 years ago
1 changed file(s) with 11 addition(s) and 9 deletion(s). Raw diff Collapse all Expand all
158158
159159 psize = (size_t) (pool->d.end - (u_char *) pool);
160160
161 new = ngx_alloc(size, pool->log);
162 if (new == NULL) {
163 return NULL;
164 }
165
166 new->d.end = (u_char *) new + psize;
161 m = ngx_alloc(psize, pool->log);
162 if (m == NULL) {
163 return NULL;
164 }
165
166 new = (ngx_pool_t *) m;
167
168 new->d.end = m + psize;
167169 new->d.next = NULL;
170
171 m += sizeof(ngx_pool_data_t);
172 new->d.last = m + size;
168173
169174 current = pool->current;
170175
177182 p->d.next = new;
178183
179184 pool->current = current ? current : new;
180
181 m = (u_char *) new + sizeof(ngx_pool_data_t);
182 new->d.last = m + size;
183185
184186 return m;
185187 }