Klaus Demo nginx / 188d0c0
Merge of r5117, r5123: allocation errors handing during upgrade. *) Core: guard against failed allocation during binary upgrade. Patch by Piotr Sikora. *) Core: fixed resource leak if binary upgrade fails due to no memory. Found by Coverity (CID 992320). Maxim Dounin 7 years ago
1 changed file(s) with 4 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
593593 var = ngx_alloc(sizeof(NGINX_VAR)
594594 + cycle->listening.nelts * (NGX_INT32_LEN + 1) + 2,
595595 cycle->log);
596 if (var == NULL) {
597 ngx_free(env);
598 return NGX_INVALID_PID;
599 }
596600
597601 p = ngx_cpymem(var, NGINX_VAR "=", sizeof(NGINX_VAR));
598602