[nginx] svn commit: r5123 - trunk/src/core

ru at nginx.com ru at nginx.com
Wed Mar 20 18:07:26 UTC 2013


Author: ru
Date: 2013-03-20 18:07:25 +0000 (Wed, 20 Mar 2013)
New Revision: 5123
URL: http://trac.nginx.org/nginx/changeset/5123/nginx

Log:
Core: fixed resource leak if binary upgrade fails due to no memory.

Found by Coverity (CID 992320).


Modified:
   trunk/src/core/nginx.c

Modified: trunk/src/core/nginx.c
===================================================================
--- trunk/src/core/nginx.c	2013-03-20 10:36:57 UTC (rev 5122)
+++ trunk/src/core/nginx.c	2013-03-20 18:07:25 UTC (rev 5123)
@@ -595,6 +595,7 @@
                     + cycle->listening.nelts * (NGX_INT32_LEN + 1) + 2,
                     cycle->log);
     if (var == NULL) {
+        ngx_free(env);
         return NGX_INVALID_PID;
     }
 



More information about the nginx-devel mailing list