Core: exit on ngx_pnalloc() failure.

Signed-off-by: Piotr Sikora <piotr@cloudflare.com>
This commit is contained in:
Piotr Sikora 2014-08-01 20:39:22 -07:00
parent f240215ba6
commit 1fe0f6a9b9

View File

@ -121,6 +121,10 @@ ngx_master_process_cycle(ngx_cycle_t *cycle)
}
title = ngx_pnalloc(cycle->pool, size);
if (title == NULL) {
/* fatal */
exit(2);
}
p = ngx_cpymem(title, master_process, sizeof(master_process) - 1);
for (i = 0; i < ngx_argc; i++) {