]> git.kaiwu.me - nginx.git/commitdiff
Core: exit on ngx_pnalloc() failure.
authorPiotr Sikora <piotr@cloudflare.com>
Sat, 2 Aug 2014 03:39:22 +0000 (20:39 -0700)
committerPiotr Sikora <piotr@cloudflare.com>
Sat, 2 Aug 2014 03:39:22 +0000 (20:39 -0700)
Signed-off-by: Piotr Sikora <piotr@cloudflare.com>
src/os/unix/ngx_process_cycle.c

index fb10d7746b56f2ec663db19cf4a93b3be19eb656..3205aa5554cb0479746cb611f7a27db3f2bc60a9 100644 (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++) {