Module: wine Branch: master Commit: 2dd29b107e9741b6322f26c2005b89435bdcc3b4 URL: http://source.winehq.org/git/wine.git/?a=commit;h=2dd29b107e9741b6322f26c200...
Author: Rico Schüller kgbricola@web.de Date: Mon Dec 31 00:24:26 2007 +0100
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..7ebe63c 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)