Core: fixed resource leak if binary upgrade fails due to no memory.

Found by Coverity (CID 992320).
This commit is contained in:
Ruslan Ermilov 2013-03-20 18:07:25 +00:00
parent 2686cb4452
commit 9e5f617d66

View File

@ -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;
}