Marcus Meissner : comdlg32: Free files on errorpath (Coverity).
Alexandre Julliard
julliard at winehq.org
Wed Feb 6 13:38:11 CST 2013
Module: wine
Branch: master
Commit: fd9becb9073026107346e042908dfc4a906a8739
URL: http://source.winehq.org/git/wine.git/?a=commit;h=fd9becb9073026107346e042908dfc4a906a8739
Author: Marcus Meissner <marcus at jet.franken.de>
Date: Thu Jan 31 18:26:47 2013 +0100
comdlg32: Free files on errorpath (Coverity).
---
dlls/comdlg32/itemdlg.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/dlls/comdlg32/itemdlg.c b/dlls/comdlg32/itemdlg.c
index 96ee5dc..33398b5 100644
--- a/dlls/comdlg32/itemdlg.c
+++ b/dlls/comdlg32/itemdlg.c
@@ -407,7 +407,7 @@ static HRESULT on_default_action(FileDialogImpl *This)
IShellFolder *psf_parent, *psf_desktop;
LPITEMIDLIST *pidla;
LPITEMIDLIST current_folder;
- LPWSTR fn_iter, files, tmp_files;
+ LPWSTR fn_iter, files = NULL, tmp_files;
UINT file_count = 0, len, i;
int open_action;
HRESULT hr, ret = E_FAIL;
@@ -425,6 +425,7 @@ static HRESULT on_default_action(FileDialogImpl *This)
if(FAILED(hr))
{
ERR("Failed to get pidl for current directory.\n");
+ HeapFree(GetProcessHeap(), 0, files);
return hr;
}
More information about the wine-cvs
mailing list