Commit fd9becb9 authored by Marcus Meissner's avatar Marcus Meissner Committed by Alexandre Julliard

comdlg32: Free files on errorpath (Coverity).

parent 5c1e82ce
...@@ -407,7 +407,7 @@ static HRESULT on_default_action(FileDialogImpl *This) ...@@ -407,7 +407,7 @@ static HRESULT on_default_action(FileDialogImpl *This)
IShellFolder *psf_parent, *psf_desktop; IShellFolder *psf_parent, *psf_desktop;
LPITEMIDLIST *pidla; LPITEMIDLIST *pidla;
LPITEMIDLIST current_folder; LPITEMIDLIST current_folder;
LPWSTR fn_iter, files, tmp_files; LPWSTR fn_iter, files = NULL, tmp_files;
UINT file_count = 0, len, i; UINT file_count = 0, len, i;
int open_action; int open_action;
HRESULT hr, ret = E_FAIL; HRESULT hr, ret = E_FAIL;
...@@ -425,6 +425,7 @@ static HRESULT on_default_action(FileDialogImpl *This) ...@@ -425,6 +425,7 @@ static HRESULT on_default_action(FileDialogImpl *This)
if(FAILED(hr)) if(FAILED(hr))
{ {
ERR("Failed to get pidl for current directory.\n"); ERR("Failed to get pidl for current directory.\n");
HeapFree(GetProcessHeap(), 0, files);
return hr; return hr;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment