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))