From 43ae46f40142ff394a2af1fad3eb62c9bf7fc8fa Mon Sep 17 00:00:00 2001 From: Igor Sysoev Date: Thu, 19 Jul 2007 19:08:22 +0000 Subject: [PATCH] fix potential segfault, found by Coverity's Scan --- src/core/nginx.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/core/nginx.c b/src/core/nginx.c index df6c72cfd..b758775e3 100644 --- a/src/core/nginx.c +++ b/src/core/nginx.c @@ -438,6 +438,9 @@ ngx_set_environment(ngx_cycle_t *cycle, ngx_uint_t *last) } var = ngx_array_push(&ccf->env); + if (var == NULL) { + return NULL; + } var->len = 2; var->data = (u_char *) "TZ";