[PATCH 2/2] kernel32: Fix memory leak in WCEL_FindPrevInHist.

Alex Henrie alexhenrie24 at gmail.com
Thu Jun 23 02:25:24 CDT 2016


Cc: Jason Edmeades <jason at edmeades.me.uk>

Coverity #713502, "Variable data going out of scope leaks the storage it
points to."

Signed-off-by: Alex Henrie <alexhenrie24 at gmail.com>
---
 dlls/kernel32/editline.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/dlls/kernel32/editline.c b/dlls/kernel32/editline.c
index bcfdece..e685e1e 100644
--- a/dlls/kernel32/editline.c
+++ b/dlls/kernel32/editline.c
@@ -469,6 +469,7 @@ static void    WCEL_FindPrevInHist(WCEL_Context* ctx)
               return;
            }
        }
+       HeapFree(GetProcessHeap(), 0, data);
     } while (ctx->histPos != startPos);
 
     return;
-- 
2.9.0




More information about the wine-patches mailing list