Commit e0b9fbe5 authored by Alex Henrie's avatar Alex Henrie Committed by Alexandre Julliard

taskschd: Use standard C functions for memory allocation in folder_collection.c.

parent d2ad82c8
...@@ -72,8 +72,8 @@ static ULONG WINAPI folders_Release(ITaskFolderCollection *iface) ...@@ -72,8 +72,8 @@ static ULONG WINAPI folders_Release(ITaskFolderCollection *iface)
{ {
TRACE("destroying %p\n", iface); TRACE("destroying %p\n", iface);
free_list(folders->list, folders->count); free_list(folders->list, folders->count);
heap_free(folders->path); free(folders->path);
heap_free(folders); free(folders);
} }
return ref; return ref;
...@@ -226,7 +226,7 @@ HRESULT TaskFolderCollection_create(const WCHAR *path, ITaskFolderCollection **o ...@@ -226,7 +226,7 @@ HRESULT TaskFolderCollection_create(const WCHAR *path, ITaskFolderCollection **o
hr = SchRpcEnumFolders(path, 0, &start_index, 0, &count, &list); hr = SchRpcEnumFolders(path, 0, &start_index, 0, &count, &list);
if (hr != S_OK) return hr; if (hr != S_OK) return hr;
folders = heap_alloc(sizeof(*folders)); folders = malloc(sizeof(*folders));
if (!folders) if (!folders)
{ {
free_list(list, count); free_list(list, count);
...@@ -235,9 +235,9 @@ HRESULT TaskFolderCollection_create(const WCHAR *path, ITaskFolderCollection **o ...@@ -235,9 +235,9 @@ HRESULT TaskFolderCollection_create(const WCHAR *path, ITaskFolderCollection **o
folders->ITaskFolderCollection_iface.lpVtbl = &TaskFolderCollection_vtbl; folders->ITaskFolderCollection_iface.lpVtbl = &TaskFolderCollection_vtbl;
folders->ref = 1; folders->ref = 1;
if (!(folders->path = heap_strdupW(path))) if (!(folders->path = wcsdup(path)))
{ {
heap_free(folders); free(folders);
free_list(list, count); free_list(list, count);
return E_OUTOFMEMORY; return E_OUTOFMEMORY;
} }
...@@ -296,7 +296,7 @@ static ULONG WINAPI enumvar_Release(IEnumVARIANT *iface) ...@@ -296,7 +296,7 @@ static ULONG WINAPI enumvar_Release(IEnumVARIANT *iface)
{ {
TRACE("destroying %p\n", iface); TRACE("destroying %p\n", iface);
ITaskFolderCollection_Release(&enumvar->folders->ITaskFolderCollection_iface); ITaskFolderCollection_Release(&enumvar->folders->ITaskFolderCollection_iface);
heap_free(enumvar); free(enumvar);
} }
return ref; return ref;
...@@ -384,7 +384,7 @@ static HRESULT NewEnum_create(TaskFolderCollection *folders, IUnknown **obj) ...@@ -384,7 +384,7 @@ static HRESULT NewEnum_create(TaskFolderCollection *folders, IUnknown **obj)
{ {
EnumVARIANT *enumvar; EnumVARIANT *enumvar;
enumvar = heap_alloc(sizeof(*enumvar)); enumvar = malloc(sizeof(*enumvar));
if (!enumvar) return E_OUTOFMEMORY; if (!enumvar) return E_OUTOFMEMORY;
enumvar->IEnumVARIANT_iface.lpVtbl = &EnumVARIANT_vtbl; enumvar->IEnumVARIANT_iface.lpVtbl = &EnumVARIANT_vtbl;
......
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