diff options
| author | Ruslan Ermilov <ru@nginx.com> | 2013-03-20 18:07:25 +0000 |
|---|---|---|
| committer | Ruslan Ermilov <ru@nginx.com> | 2013-03-20 18:07:25 +0000 |
| commit | 9e5f617d6631088adc77800da51815bbc2387651 (patch) | |
| tree | d0422074716da3ed7b8146e1824831b17ff05371 /src/core/nginx.c | |
| parent | 2686cb44529462614a1846f29922bb68852dafb6 (diff) | |
| download | nginx-9e5f617d6631088adc77800da51815bbc2387651.tar.gz nginx-9e5f617d6631088adc77800da51815bbc2387651.tar.bz2 | |
Core: fixed resource leak if binary upgrade fails due to no memory.
Found by Coverity (CID 992320).
Diffstat (limited to 'src/core/nginx.c')
| -rw-r--r-- | src/core/nginx.c | 1 |
1 files changed, 1 insertions, 0 deletions
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; } |
