>From e90430174bc31f4c5b004c3622fa33be73433cfc Mon Sep 17 00:00:00 2001
From: =?utf-8?q?Rico=20Sch=C3=BCller?= <kgbricola@web.de>
Date: Mon, 31 Dec 2007 00:24:26 +0100
Subject: [PATCH] cabinet: Fix memory leak (found by Smatch)

---
 dlls/cabinet/cabinet_main.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/dlls/cabinet/cabinet_main.c b/dlls/cabinet/cabinet_main.c
index 9e2c18a..6f92211 100644
--- a/dlls/cabinet/cabinet_main.c
+++ b/dlls/cabinet/cabinet_main.c
@@ -229,7 +229,11 @@ static INT_PTR fdi_notify_extract(FDINOTIFICATIONTYPE fdint, PFDINOTIFICATION pf
                 file_in_list(pDestination->FileList, pfdin->psz1, &node);
 
                 if (node && !node->DoExtract)
+                {
+                    HeapFree(GetProcessHeap(), 0, szFullPath);
+                    HeapFree(GetProcessHeap(), 0, szDirectory);
                     return 0;
+                }
 
                 /* create the destination directory if it doesn't exist */
                 if (GetFileAttributesA(szDirectory) == INVALID_FILE_ATTRIBUTES)
-- 
1.5.3.3

