mirror of
https://github.com/nginx/nginx.git
synced 2024-12-20 06:03:31 -06:00
Core: guard against failed allocation during binary upgrade.
Patch by Piotr Sikora.
This commit is contained in:
parent
bac0cb3bbd
commit
5a7661e581
@ -594,6 +594,9 @@ ngx_exec_new_binary(ngx_cycle_t *cycle, char *const *argv)
|
||||
var = ngx_alloc(sizeof(NGINX_VAR)
|
||||
+ cycle->listening.nelts * (NGX_INT32_LEN + 1) + 2,
|
||||
cycle->log);
|
||||
if (var == NULL) {
|
||||
return NGX_INVALID_PID;
|
||||
}
|
||||
|
||||
p = ngx_cpymem(var, NGINX_VAR "=", sizeof(NGINX_VAR));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user