﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc	uname	nginx_version
1914	Memory Leak in directory 'src/core', file 'ngx_buf.c'	wp02855@…		"In reviewing source code in nginx-1.15.0, it would appear that there are some memory leaks in file 'ngx_buf.c' which when functions in this file are called, the memory allocations are not released, leading to over-utilization of memory over time, the patch file is below:

@@ -21,6 +21,7 @@

     b->start = ngx_palloc(pool, size);
     if (b->start == NULL) {
+       ngx_free(b);    /* release previous memory allocation before going home */
         return NULL;
     }

@@ -84,7 +85,8 @@

         b = ngx_calloc_buf(pool);
         if (b == NULL) {
-            return NULL;
+           ngx_free(p);    /* release previous memory allocation and go home */
+            return NULL;    /* how do we handle previous allocations of ngx_calloc_buf()? */
         }

         /*

"	defect	closed	minor		nginx-core	1.17.x	invalid	potential memory leak(s)		bill@foobar 4.4.0-18362-Microsoft #476-Microsoft Fri Nov 01 16:53:00 PST 2019 x86_64 GNU/Linux	version 1.15.0 (using static analysis of source code)
