aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/core/nginx.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/core/nginx.c b/src/core/nginx.c
index d02f9111d..e81e7af74 100644
--- a/src/core/nginx.c
+++ b/src/core/nginx.c
@@ -594,6 +594,9 @@ ngx_exec_new_binary(ngx_cycle_t *cycle, char *const *argv)
var = ngx_alloc(sizeof(NGINX_VAR)
+ cycle->listening.nelts * (NGX_INT32_LEN + 1) + 2,
cycle->log);
+ if (var == NULL) {
+ return NGX_INVALID_PID;
+ }
p = ngx_cpymem(var, NGINX_VAR "=", sizeof(NGINX_VAR));