comdlg32/filedlg: Fix a find file handle leak.
This commit is contained in:
parent
c0456e2ca7
commit
c8f1e9668a
|
@ -1527,12 +1527,11 @@ static LRESULT FILEDLG95_InitControls(HWND hwnd)
|
|||
if ( win98plus && handledPath == FALSE &&
|
||||
fodInfos->filter && *fodInfos->filter) {
|
||||
|
||||
BOOL searchMore = TRUE;
|
||||
LPCWSTR lpstrPos = fodInfos->filter;
|
||||
WIN32_FIND_DATAW FindFileData;
|
||||
HANDLE hFind;
|
||||
|
||||
while (searchMore)
|
||||
while (1)
|
||||
{
|
||||
/* filter is a list... title\0ext\0......\0\0 */
|
||||
|
||||
|
@ -1550,7 +1549,6 @@ static LRESULT FILEDLG95_InitControls(HWND hwnd)
|
|||
lpstrPos += lstrlenW(lpstrPos) + 1;
|
||||
|
||||
} else {
|
||||
searchMore = FALSE;
|
||||
|
||||
MemFree(fodInfos->initdir);
|
||||
fodInfos->initdir = MemAlloc(MAX_PATH*sizeof(WCHAR));
|
||||
|
@ -1559,6 +1557,7 @@ static LRESULT FILEDLG95_InitControls(HWND hwnd)
|
|||
handledPath = TRUE;
|
||||
TRACE("No initial dir specified, but files of type %s found in current, so using it\n",
|
||||
debugstr_w(lpstrPos));
|
||||
FindClose(hFind);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue