Skip to content

Commit

Permalink
Core: exit on ngx_pnalloc() failure.
Browse files Browse the repository at this point in the history
Signed-off-by: Piotr Sikora <[email protected]>
  • Loading branch information
PiotrSikora committed Aug 2, 2014
1 parent f240215 commit 1fe0f6a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/os/unix/ngx_process_cycle.c
Original file line number Diff line number Diff line change
Expand Up @@ -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++) {
Expand Down

0 comments on commit 1fe0f6a

Please sign in to comment.