Author: ru
Date: 2013-03-18 07:13:57 +0000 (Mon, 18 Mar 2013)
New Revision: 5117
URL: http://trac.nginx.org/nginx/changeset/5117/nginx
Log:
Core: guard against failed allocation during binary upgrade.
Patch by Piotr Sikora.
Modified:
trunk/src/core/nginx.c
Modified: trunk/src/core/nginx.c
===================================================================
--- trunk/src/core/nginx.c 2013-03-15 20:00:49 UTC (rev 5116)
+++ trunk/src/core/nginx.c 2013-03-18 07:13:57 UTC (rev 5117)
@@ -594,6 +594,9 @@
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));
_______________________________________________
nginx-devel mailing list
[email protected]
http://mailman.nginx.org/mailman/listinfo/nginx-devel