[nginx] Core: exit on ngx_pnalloc() failure.
Maxim Dounin
mdounin at mdounin.ru
Sun Aug 3 22:55:38 UTC 2014
details: http://hg.nginx.org/nginx/rev/f8764e20fcd7
branches:
changeset: 5786:f8764e20fcd7
user: Piotr Sikora <piotr at cloudflare.com>
date: Fri Aug 01 20:39:22 2014 -0700
description:
Core: exit on ngx_pnalloc() failure.
Signed-off-by: Piotr Sikora <piotr at cloudflare.com>
diffstat:
src/os/unix/ngx_process_cycle.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diffs (14 lines):
diff --git a/src/os/unix/ngx_process_cycle.c b/src/os/unix/ngx_process_cycle.c
--- a/src/os/unix/ngx_process_cycle.c
+++ b/src/os/unix/ngx_process_cycle.c
@@ -121,6 +121,10 @@ ngx_master_process_cycle(ngx_cycle_t *cy
}
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++) {
More information about the nginx-devel
mailing list