mirror of
https://github.com/nginx/nginx.git
synced 2024-12-12 02:09:04 +08:00
Core: fixed resource leak if binary upgrade fails due to no memory.
Found by Coverity (CID 992320).
This commit is contained in:
parent
2686cb4452
commit
9e5f617d66
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user