From 9e5f617d6631088adc77800da51815bbc2387651 Mon Sep 17 00:00:00 2001 From: Ruslan Ermilov Date: Wed, 20 Mar 2013 18:07:25 +0000 Subject: [PATCH] Core: fixed resource leak if binary upgrade fails due to no memory. Found by Coverity (CID 992320). --- src/core/nginx.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/core/nginx.c b/src/core/nginx.c index e81e7af74..045977691 100644 --- a/src/core/nginx.c +++ b/src/core/nginx.c @@ -595,6 +595,7 @@ ngx_exec_new_binary(ngx_cycle_t *cycle, char *const *argv) + cycle->listening.nelts * (NGX_INT32_LEN + 1) + 2, cycle->log); if (var == NULL) { + ngx_free(env); return NGX_INVALID_PID; }