Correct return value in a couple of error cases.
diff --git a/dlls/shell32/pidl.c b/dlls/shell32/pidl.c
index 551ae49..3b366c0 100644
--- a/dlls/shell32/pidl.c
+++ b/dlls/shell32/pidl.c
@@ -1621,6 +1621,9 @@
HANDLE hFile;
WIN32_FIND_DATAA stffile;
+ if (!ppidl)
+ return E_INVALIDARG;
+
hFile = FindFirstFileA(szPath, &stffile);
if (hFile == INVALID_HANDLE_VALUE)
@@ -1630,7 +1633,7 @@
*ppidl = _ILCreateFromFindDataA(&stffile);
- return S_OK;
+ return *ppidl ? S_OK : E_OUTOFMEMORY;
}
LPITEMIDLIST _ILCreateDrive(LPCWSTR lpszNew)