Signed-off-by: Sven Baars sven.wine@gmail.com --- dlls/shell32/shellpath.c | 2 +- dlls/shell32/tests/shellpath.c | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/dlls/shell32/shellpath.c b/dlls/shell32/shellpath.c index f08474b363..8c6e8a89b2 100644 --- a/dlls/shell32/shellpath.c +++ b/dlls/shell32/shellpath.c @@ -4970,7 +4970,7 @@ HRESULT WINAPI SHGetKnownFolderPath(REFKNOWNFOLDERID rfid, DWORD flags, HANDLE t if (!(flags & KF_FLAG_CREATE)) { hr = HRESULT_FROM_WIN32(ERROR_PATH_NOT_FOUND); - goto done; + goto failed; }
/* create directory/directories */ diff --git a/dlls/shell32/tests/shellpath.c b/dlls/shell32/tests/shellpath.c index 38b56f01d3..f768f44c8b 100644 --- a/dlls/shell32/tests/shellpath.c +++ b/dlls/shell32/tests/shellpath.c @@ -1875,7 +1875,10 @@ if (0) { /* crashes */ path = NULL; hr = pSHGetKnownFolderPath(folder_id, KF_FLAG_DEFAULT, NULL, &path); if (FAILED(hr)) + { + ok(path == NULL, "expected path == NULL\n"); continue; + } ok(hr == S_OK, "expected S_OK, got 0x%08x\n", hr); ok(path != NULL, "expected path != NULL\n");
Signed-off-by: Sven Baars sven.wine@gmail.com --- dlls/mstask/task.c | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-)
diff --git a/dlls/mstask/task.c b/dlls/mstask/task.c index 6c27b76c95..9a39fc9402 100644 --- a/dlls/mstask/task.c +++ b/dlls/mstask/task.c @@ -1690,7 +1690,11 @@ static HRESULT WINAPI MSTASK_IPersistFile_Save(IPersistFile *iface, LPCOLESTR ta hfile = CreateFileW(task_name, GENERIC_READ | GENERIC_WRITE, 0, NULL, disposition, 0, 0); if (hfile != INVALID_HANDLE_VALUE) break;
- if (try++ >= 3) return HRESULT_FROM_WIN32(GetLastError()); + if (try++ >= 3) + { + hr = HRESULT_FROM_WIN32(GetLastError()); + goto failed; + } Sleep(100); }
@@ -1781,13 +1785,16 @@ failed: CoTaskMemFree(comment); CoTaskMemFree(user_data);
- CloseHandle(hfile); - if (hr != S_OK) - DeleteFileW(task_name); - else if (remember) + if (hfile != INVALID_HANDLE_VALUE) { - heap_free(This->task_name); - This->task_name = heap_strdupW(task_name); + CloseHandle(hfile); + if (hr != S_OK) + DeleteFileW(task_name); + else if (remember) + { + heap_free(This->task_name); + This->task_name = heap_strdupW(task_name); + } } return hr; }
Hi,
While running your changed tests on Windows, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=47201
Your paranoid android.
=== debian9 (32 bit Chinese:China report) ===
mstask: task_scheduler.c:498: Test failed: got 0x80070020
=== debian9 (32 bit WoW report) ===
mstask: task_scheduler.c:498: Test failed: got 0x80070020
Signed-off-by: Sven Baars sven.wine@gmail.com --- dlls/mstask/task_scheduler.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/dlls/mstask/task_scheduler.c b/dlls/mstask/task_scheduler.c index 7998b3a50e..ebf25d08e8 100644 --- a/dlls/mstask/task_scheduler.c +++ b/dlls/mstask/task_scheduler.c @@ -143,10 +143,6 @@ static HRESULT WINAPI EnumWorkItems_Next(IEnumWorkItems *iface, ULONG count, LPW enumerated = 0; list = NULL;
- allocated = 64; - list = CoTaskMemAlloc(allocated * sizeof(list[0])); - if (!list) return E_OUTOFMEMORY; - if (This->handle == INVALID_HANDLE_VALUE) { GetWindowsDirectoryW(path, MAX_PATH); @@ -161,6 +157,10 @@ static HRESULT WINAPI EnumWorkItems_Next(IEnumWorkItems *iface, ULONG count, LPW return S_FALSE; }
+ allocated = 64; + list = CoTaskMemAlloc(allocated * sizeof(list[0])); + if (!list) return E_OUTOFMEMORY; + do { if (is_file(&data))
Hi,
While running your changed tests on Windows, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=47202
Your paranoid android.
=== debian9 (32 bit WoW report) ===
mstask: task_scheduler.c:498: Test failed: got 0x80070020
=== debian9 (64 bit WoW report) ===
mstask: task_scheduler.c:498: Test failed: got 0x80070020
Signed-off-by: Sven Baars sven.wine@gmail.com --- dlls/ws2_32/socket.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c index 640726d01e..cd7e11b453 100644 --- a/dlls/ws2_32/socket.c +++ b/dlls/ws2_32/socket.c @@ -6272,7 +6272,7 @@ static struct WS_hostent* WS_get_local_ips( char *hostname ) return NULL; adapters = HeapAlloc(GetProcessHeap(), 0, adap_size); routes = HeapAlloc(GetProcessHeap(), 0, route_size); - route_addrs = HeapAlloc(GetProcessHeap(), 0, 0); /* HeapReAlloc doesn't work on NULL */ + route_addrs = HeapAlloc(GetProcessHeap(), 0, 1); /* HeapReAlloc doesn't work on NULL */ if (adapters == NULL || routes == NULL || route_addrs == NULL) goto cleanup; /* Obtain the adapter list and the full routing table */
Signed-off-by: Sven Baars sven.wine@gmail.com --- dlls/taskschd/regtask.c | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/dlls/taskschd/regtask.c b/dlls/taskschd/regtask.c index 5c81821e69..74f95d9944 100644 --- a/dlls/taskschd/regtask.c +++ b/dlls/taskschd/regtask.c @@ -350,6 +350,7 @@ HRESULT RegisteredTask_create(const WCHAR *path, const WCHAR *name, ITaskDefinit SysFreeString(xml); return hr; } + SysFreeString(xml);
heap_free(full_name); full_name = heap_strdupW(actual_path); @@ -366,6 +367,7 @@ HRESULT RegisteredTask_create(const WCHAR *path, const WCHAR *name, ITaskDefinit { heap_free(full_name); heap_free(regtask); + MIDL_user_free(xml); return hr; } MIDL_user_free(xml);