mirror of
https://github.com/nginx/nginx.git
synced 2025-01-22 12:12:59 +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->listening.nelts * (NGX_INT32_LEN + 1) + 2,
|
||||||
cycle->log);
|
cycle->log);
|
||||||
if (var == NULL) {
|
if (var == NULL) {
|
||||||
|
ngx_free(env);
|
||||||
return NGX_INVALID_PID;
|
return NGX_INVALID_PID;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user