Commit 9140c673 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

shell32/tests: Use CRT memory allocation functions.

parent f4111937
...@@ -25,7 +25,6 @@ ...@@ -25,7 +25,6 @@
#include "shlguid.h" #include "shlguid.h"
#include "shobjidl.h" #include "shobjidl.h"
#include "wine/heap.h"
#include "wine/test.h" #include "wine/test.h"
...@@ -104,8 +103,8 @@ static struct assoc_getstring_test getstring_tests[] = ...@@ -104,8 +103,8 @@ static struct assoc_getstring_test getstring_tests[] =
static void getstring_test(LPCWSTR assocName, HKEY progIdKey, ASSOCSTR str, LPCWSTR expected_string, int line) static void getstring_test(LPCWSTR assocName, HKEY progIdKey, ASSOCSTR str, LPCWSTR expected_string, int line)
{ {
IQueryAssociations *assoc; IQueryAssociations *assoc;
WCHAR *buffer;
HRESULT hr; HRESULT hr;
WCHAR *buffer = NULL;
DWORD len; DWORD len;
hr = CoCreateInstance(&CLSID_QueryAssociations, NULL, CLSCTX_INPROC_SERVER, &IID_IQueryAssociations, (void*)&assoc); hr = CoCreateInstance(&CLSID_QueryAssociations, NULL, CLSCTX_INPROC_SERVER, &IID_IQueryAssociations, (void*)&assoc);
...@@ -122,19 +121,19 @@ static void getstring_test(LPCWSTR assocName, HKEY progIdKey, ASSOCSTR str, LPCW ...@@ -122,19 +121,19 @@ static void getstring_test(LPCWSTR assocName, HKEY progIdKey, ASSOCSTR str, LPCW
return; return;
} }
buffer = heap_alloc(len * sizeof(WCHAR)); buffer = malloc(len * sizeof(WCHAR));
ok_(__FILE__, line)(buffer != NULL, "out of memory\n"); ok_(__FILE__, line)(buffer != NULL, "out of memory\n");
hr = IQueryAssociations_GetString(assoc, 0, str, NULL, buffer, &len); hr = IQueryAssociations_GetString(assoc, 0, str, NULL, buffer, &len);
ok_(__FILE__, line)(hr == S_OK, "GetString returned 0x%lx, expected S_OK\n", hr); ok_(__FILE__, line)(hr == S_OK, "GetString returned 0x%lx, expected S_OK\n", hr);
ok_(__FILE__, line)(lstrcmpW(buffer, expected_string) == 0, "GetString returned %s, expected %s\n", ok_(__FILE__, line)(lstrcmpW(buffer, expected_string) == 0, "GetString returned %s, expected %s\n",
wine_dbgstr_w(buffer), wine_dbgstr_w(expected_string)); wine_dbgstr_w(buffer), wine_dbgstr_w(expected_string));
free(buffer);
} else { } else {
ok_(__FILE__, line)(FAILED(hr), "GetString returned 0x%lx, expected failure\n", hr); ok_(__FILE__, line)(FAILED(hr), "GetString returned 0x%lx, expected failure\n", hr);
} }
IQueryAssociations_Release(assoc); IQueryAssociations_Release(assoc);
heap_free(buffer);
} }
static void test_IQueryAssociations_GetString(void) static void test_IQueryAssociations_GetString(void)
......
...@@ -28,7 +28,6 @@ ...@@ -28,7 +28,6 @@
#include "shldisp.h" #include "shldisp.h"
#include "shlobj.h" #include "shlobj.h"
#include "wine/heap.h"
#include "wine/test.h" #include "wine/test.h"
static HWND hMainWnd, hEdit; static HWND hMainWnd, hEdit;
...@@ -317,7 +316,7 @@ static ULONG WINAPI string_enumerator_Release(IEnumString *iface) ...@@ -317,7 +316,7 @@ static ULONG WINAPI string_enumerator_Release(IEnumString *iface)
ULONG ref = InterlockedDecrement(&this->ref); ULONG ref = InterlockedDecrement(&this->ref);
if (!ref) if (!ref)
heap_free(this); free(this);
return ref; return ref;
} }
...@@ -426,7 +425,7 @@ static HRESULT string_enumerator_create(void **ppv, WCHAR **suggestions, int cou ...@@ -426,7 +425,7 @@ static HRESULT string_enumerator_create(void **ppv, WCHAR **suggestions, int cou
{ {
struct string_enumerator *object; struct string_enumerator *object;
object = heap_alloc_zero(sizeof(*object)); object = calloc(1, sizeof(*object));
object->IEnumString_iface.lpVtbl = &string_enumerator_vtbl; object->IEnumString_iface.lpVtbl = &string_enumerator_vtbl;
object->IACList_iface.lpVtbl = &aclist_vtbl; object->IACList_iface.lpVtbl = &aclist_vtbl;
object->ref = 1; object->ref = 1;
......
...@@ -26,7 +26,6 @@ ...@@ -26,7 +26,6 @@
#include "shlobj.h" #include "shlobj.h"
#include "shlwapi.h" #include "shlwapi.h"
#include "wine/heap.h"
#include "wine/test.h" #include "wine/test.h"
#include "initguid.h" #include "initguid.h"
...@@ -193,7 +192,7 @@ static ULONG WINAPI IExplorerPaneVisibility_fnRelease(IExplorerPaneVisibility *i ...@@ -193,7 +192,7 @@ static ULONG WINAPI IExplorerPaneVisibility_fnRelease(IExplorerPaneVisibility *i
ULONG ref = InterlockedDecrement(&This->ref); ULONG ref = InterlockedDecrement(&This->ref);
if(!ref) if(!ref)
heap_free(This); free(This);
return ref; return ref;
} }
...@@ -239,7 +238,7 @@ static IExplorerPaneVisibilityImpl *create_explorerpanevisibility(void) ...@@ -239,7 +238,7 @@ static IExplorerPaneVisibilityImpl *create_explorerpanevisibility(void)
{ {
IExplorerPaneVisibilityImpl *epv; IExplorerPaneVisibilityImpl *epv;
epv = heap_alloc_zero(sizeof(*epv)); epv = calloc(1, sizeof(*epv));
epv->IExplorerPaneVisibility_iface.lpVtbl = &epvvt; epv->IExplorerPaneVisibility_iface.lpVtbl = &epvvt;
epv->ref = 1; epv->ref = 1;
...@@ -282,7 +281,7 @@ static ULONG WINAPI ICommDlgBrowser3_fnRelease(ICommDlgBrowser3 *iface) ...@@ -282,7 +281,7 @@ static ULONG WINAPI ICommDlgBrowser3_fnRelease(ICommDlgBrowser3 *iface)
ULONG ref = InterlockedDecrement(&This->ref); ULONG ref = InterlockedDecrement(&This->ref);
if(!ref) if(!ref)
heap_free(This); free(This);
return ref; return ref;
} }
...@@ -393,7 +392,7 @@ static ICommDlgBrowser3Impl *create_commdlgbrowser3(void) ...@@ -393,7 +392,7 @@ static ICommDlgBrowser3Impl *create_commdlgbrowser3(void)
{ {
ICommDlgBrowser3Impl *cdb; ICommDlgBrowser3Impl *cdb;
cdb = heap_alloc_zero(sizeof(*cdb)); cdb = calloc(1, sizeof(*cdb));
cdb->ICommDlgBrowser3_iface.lpVtbl = &cdbvtbl; cdb->ICommDlgBrowser3_iface.lpVtbl = &cdbvtbl;
cdb->ref = 1; cdb->ref = 1;
...@@ -450,7 +449,7 @@ static ULONG WINAPI IServiceProvider_fnRelease(IServiceProvider *iface) ...@@ -450,7 +449,7 @@ static ULONG WINAPI IServiceProvider_fnRelease(IServiceProvider *iface)
LONG ref = InterlockedDecrement(&This->ref); LONG ref = InterlockedDecrement(&This->ref);
if(!ref) if(!ref)
heap_free(This); free(This);
return ref; return ref;
} }
...@@ -491,7 +490,7 @@ static const IServiceProviderVtbl spvtbl = ...@@ -491,7 +490,7 @@ static const IServiceProviderVtbl spvtbl =
static IServiceProviderImpl *create_serviceprovider(void) static IServiceProviderImpl *create_serviceprovider(void)
{ {
IServiceProviderImpl *sp = heap_alloc(sizeof(*sp)); IServiceProviderImpl *sp = malloc(sizeof(*sp));
sp->IServiceProvider_iface.lpVtbl = &spvtbl; sp->IServiceProvider_iface.lpVtbl = &spvtbl;
sp->ref = 1; sp->ref = 1;
return sp; return sp;
......
...@@ -21,7 +21,6 @@ ...@@ -21,7 +21,6 @@
#include <assert.h> #include <assert.h>
#include <windows.h> #include <windows.h>
#include "wine/heap.h"
#include "wine/test.h" #include "wine/test.h"
/* undocumented SWP flags - from SDK 3.1 */ /* undocumented SWP flags - from SDK 3.1 */
...@@ -68,13 +67,13 @@ static void add_message(struct msg_sequence **seq, int sequence_index, ...@@ -68,13 +67,13 @@ static void add_message(struct msg_sequence **seq, int sequence_index,
if (!msg_seq->sequence) if (!msg_seq->sequence)
{ {
msg_seq->size = 10; msg_seq->size = 10;
msg_seq->sequence = heap_alloc(msg_seq->size * sizeof (struct message)); msg_seq->sequence = malloc(msg_seq->size * sizeof (struct message));
} }
if (msg_seq->count == msg_seq->size) if (msg_seq->count == msg_seq->size)
{ {
msg_seq->size *= 2; msg_seq->size *= 2;
msg_seq->sequence = heap_realloc(msg_seq->sequence, msg_seq->size * sizeof (struct message)); msg_seq->sequence = realloc(msg_seq->sequence, msg_seq->size * sizeof (struct message));
} }
assert(msg_seq->sequence); assert(msg_seq->sequence);
...@@ -91,7 +90,7 @@ static void add_message(struct msg_sequence **seq, int sequence_index, ...@@ -91,7 +90,7 @@ static void add_message(struct msg_sequence **seq, int sequence_index,
static void flush_sequence(struct msg_sequence **seg, int sequence_index) static void flush_sequence(struct msg_sequence **seg, int sequence_index)
{ {
struct msg_sequence *msg_seq = seg[sequence_index]; struct msg_sequence *msg_seq = seg[sequence_index];
heap_free(msg_seq->sequence); free(msg_seq->sequence);
msg_seq->sequence = NULL; msg_seq->sequence = NULL;
msg_seq->count = msg_seq->size = 0; msg_seq->count = msg_seq->size = 0;
} }
...@@ -289,5 +288,5 @@ static void init_msg_sequences(struct msg_sequence **seq, int n) ...@@ -289,5 +288,5 @@ static void init_msg_sequences(struct msg_sequence **seq, int n)
int i; int i;
for (i = 0; i < n; i++) for (i = 0; i < n; i++)
seq[i] = heap_alloc_zero(sizeof(struct msg_sequence)); seq[i] = calloc(1, sizeof(struct msg_sequence));
} }
...@@ -27,7 +27,6 @@ ...@@ -27,7 +27,6 @@
#include "shlwapi.h" #include "shlwapi.h"
#include "winsvc.h" #include "winsvc.h"
#include "wine/heap.h"
#include "wine/test.h" #include "wine/test.h"
#include "initguid.h" #include "initguid.h"
...@@ -278,7 +277,7 @@ static void test_namespace(void) ...@@ -278,7 +277,7 @@ static void test_namespace(void)
GetFullPathNameW(winetestW, MAX_PATH, tempW, NULL); GetFullPathNameW(winetestW, MAX_PATH, tempW, NULL);
len = GetLongPathNameW(tempW, NULL, 0); len = GetLongPathNameW(tempW, NULL, 0);
long_pathW = heap_alloc(len * sizeof(WCHAR)); long_pathW = malloc(len * sizeof(WCHAR));
GetLongPathNameW(tempW, long_pathW, len); GetLongPathNameW(tempW, long_pathW, len);
V_VT(&var) = VT_BSTR; V_VT(&var) = VT_BSTR;
...@@ -350,7 +349,7 @@ static void test_namespace(void) ...@@ -350,7 +349,7 @@ static void test_namespace(void)
SysFreeString(V_BSTR(&var)); SysFreeString(V_BSTR(&var));
} }
heap_free(long_pathW); free(long_pathW);
RemoveDirectoryW(winetestW); RemoveDirectoryW(winetestW);
SetCurrentDirectoryW(curW); SetCurrentDirectoryW(curW);
IShellDispatch_Release(sd); IShellDispatch_Release(sd);
......
...@@ -29,7 +29,6 @@ ...@@ -29,7 +29,6 @@
#include "shellapi.h" #include "shellapi.h"
#include "commoncontrols.h" #include "commoncontrols.h"
#include "wine/heap.h"
#include "wine/test.h" #include "wine/test.h"
#include "shell32_test.h" #include "shell32_test.h"
...@@ -70,12 +69,12 @@ static LPITEMIDLIST path_to_pidl(const char* path) ...@@ -70,12 +69,12 @@ static LPITEMIDLIST path_to_pidl(const char* path)
int len; int len;
len=MultiByteToWideChar(CP_ACP, 0, path, -1, NULL, 0); len=MultiByteToWideChar(CP_ACP, 0, path, -1, NULL, 0);
pathW = heap_alloc(len * sizeof(WCHAR)); pathW = malloc(len * sizeof(WCHAR));
MultiByteToWideChar(CP_ACP, 0, path, -1, pathW, len); MultiByteToWideChar(CP_ACP, 0, path, -1, pathW, len);
r=pSHILCreateFromPath(pathW, &pidl, NULL); r=pSHILCreateFromPath(pathW, &pidl, NULL);
ok(r == S_OK, "SHILCreateFromPath failed (0x%08lx)\n", r); ok(r == S_OK, "SHILCreateFromPath failed (0x%08lx)\n", r);
heap_free(pathW); free(pathW);
} }
return pidl; return pidl;
} }
......
...@@ -40,7 +40,6 @@ ...@@ -40,7 +40,6 @@
#include "shlwapi.h" #include "shlwapi.h"
#include "ddeml.h" #include "ddeml.h"
#include "wine/heap.h"
#include "wine/test.h" #include "wine/test.h"
#include "shell32_test.h" #include "shell32_test.h"
...@@ -756,7 +755,7 @@ static LSTATUS myRegDeleteTreeA(HKEY hKey, LPCSTR lpszSubKey) ...@@ -756,7 +755,7 @@ static LSTATUS myRegDeleteTreeA(HKEY hKey, LPCSTR lpszSubKey)
if (dwMaxLen > ARRAY_SIZE(szNameBuf)) if (dwMaxLen > ARRAY_SIZE(szNameBuf))
{ {
/* Name too big: alloc a buffer for it */ /* Name too big: alloc a buffer for it */
if (!(lpszName = heap_alloc(dwMaxLen*sizeof(CHAR)))) if (!(lpszName = malloc(dwMaxLen*sizeof(CHAR))))
{ {
ret = ERROR_NOT_ENOUGH_MEMORY; ret = ERROR_NOT_ENOUGH_MEMORY;
goto cleanup; goto cleanup;
...@@ -791,7 +790,7 @@ static LSTATUS myRegDeleteTreeA(HKEY hKey, LPCSTR lpszSubKey) ...@@ -791,7 +790,7 @@ static LSTATUS myRegDeleteTreeA(HKEY hKey, LPCSTR lpszSubKey)
cleanup: cleanup:
/* Free buffer if allocated */ /* Free buffer if allocated */
if (lpszName != szNameBuf) if (lpszName != szNameBuf)
heap_free(lpszName); free(lpszName);
if(lpszSubKey) if(lpszSubKey)
RegCloseKey(hSubKey); RegCloseKey(hSubKey);
return ret; return ret;
...@@ -851,11 +850,11 @@ static void create_test_verb_dde(const char* classname, const char* verb, ...@@ -851,11 +850,11 @@ static void create_test_verb_dde(const char* classname, const char* verb,
} }
else else
{ {
cmd = heap_alloc(strlen(argv0) + 10 + strlen(child_file) + 2 + strlen(cmdtail) + 1); cmd = malloc(strlen(argv0) + 10 + strlen(child_file) + 2 + strlen(cmdtail) + 1);
sprintf(cmd,"%s shlexec \"%s\" %s", argv0, child_file, cmdtail); sprintf(cmd,"%s shlexec \"%s\" %s", argv0, child_file, cmdtail);
rc=RegSetValueExA(hkey_cmd, NULL, 0, REG_SZ, (LPBYTE)cmd, strlen(cmd)+1); rc=RegSetValueExA(hkey_cmd, NULL, 0, REG_SZ, (LPBYTE)cmd, strlen(cmd)+1);
ok(rc == ERROR_SUCCESS, "setting command failed with %ld\n", rc); ok(rc == ERROR_SUCCESS, "setting command failed with %ld\n", rc);
heap_free(cmd); free(cmd);
} }
if (ddeexec) if (ddeexec)
......
...@@ -37,7 +37,6 @@ ...@@ -37,7 +37,6 @@
#include "ocidl.h" #include "ocidl.h"
#include "oleauto.h" #include "oleauto.h"
#include "wine/heap.h"
#include "wine/test.h" #include "wine/test.h"
#include <initguid.h> #include <initguid.h>
...@@ -75,7 +74,7 @@ static WCHAR *make_wstr(const char *str) ...@@ -75,7 +74,7 @@ static WCHAR *make_wstr(const char *str)
if(!len || len < 0) if(!len || len < 0)
return NULL; return NULL;
ret = heap_alloc(len * sizeof(WCHAR)); ret = malloc(len * sizeof(WCHAR));
if(!ret) if(!ret)
return NULL; return NULL;
...@@ -3032,7 +3031,7 @@ static void test_SHGetIDListFromObject(void) ...@@ -3032,7 +3031,7 @@ static void test_SHGetIDListFromObject(void)
hres = pSHGetIDListFromObject(NULL, &pidl); hres = pSHGetIDListFromObject(NULL, &pidl);
ok(hres == E_NOINTERFACE, "Got %lx\n", hres); ok(hres == E_NOINTERFACE, "Got %lx\n", hres);
punkimpl = heap_alloc(sizeof(*punkimpl)); punkimpl = malloc(sizeof(*punkimpl));
punkimpl->IUnknown_iface.lpVtbl = &vt_IUnknown; punkimpl->IUnknown_iface.lpVtbl = &vt_IUnknown;
punkimpl->ifaces = ifaces; punkimpl->ifaces = ifaces;
punkimpl->unknown = 0; punkimpl->unknown = 0;
...@@ -3049,7 +3048,7 @@ static void test_SHGetIDListFromObject(void) ...@@ -3049,7 +3048,7 @@ static void test_SHGetIDListFromObject(void)
"interface not requested.\n"); "interface not requested.\n");
ok(!punkimpl->unknown, "Got %ld unknown.\n", punkimpl->unknown); ok(!punkimpl->unknown, "Got %ld unknown.\n", punkimpl->unknown);
heap_free(punkimpl); free(punkimpl);
pidl_desktop = NULL; pidl_desktop = NULL;
SHGetSpecialFolderLocation(NULL, CSIDL_DESKTOP, &pidl_desktop); SHGetSpecialFolderLocation(NULL, CSIDL_DESKTOP, &pidl_desktop);
...@@ -3203,7 +3202,7 @@ static void test_SHGetItemFromObject(void) ...@@ -3203,7 +3202,7 @@ static void test_SHGetItemFromObject(void)
hres = pSHGetItemFromObject(NULL, &IID_IUnknown, (void**)&punk); hres = pSHGetItemFromObject(NULL, &IID_IUnknown, (void**)&punk);
ok(hres == E_NOINTERFACE, "Got 0x%08lx\n", hres); ok(hres == E_NOINTERFACE, "Got 0x%08lx\n", hres);
punkimpl = heap_alloc(sizeof(*punkimpl)); punkimpl = malloc(sizeof(*punkimpl));
punkimpl->IUnknown_iface.lpVtbl = &vt_IUnknown; punkimpl->IUnknown_iface.lpVtbl = &vt_IUnknown;
punkimpl->ifaces = ifaces; punkimpl->ifaces = ifaces;
punkimpl->unknown = 0; punkimpl->unknown = 0;
...@@ -3221,7 +3220,7 @@ static void test_SHGetItemFromObject(void) ...@@ -3221,7 +3220,7 @@ static void test_SHGetItemFromObject(void)
"interface not requested.\n"); "interface not requested.\n");
ok(!punkimpl->unknown, "Got %ld unknown.\n", punkimpl->unknown); ok(!punkimpl->unknown, "Got %ld unknown.\n", punkimpl->unknown);
heap_free(punkimpl); free(punkimpl);
/* Test IShellItem */ /* Test IShellItem */
hres = pSHGetItemFromObject((IUnknown*)psfdesktop, &IID_IShellItem, (void**)&psi); hres = pSHGetItemFromObject((IUnknown*)psfdesktop, &IID_IShellItem, (void**)&psi);
...@@ -4584,7 +4583,7 @@ static void r_verify_pidl(unsigned l, LPCITEMIDLIST pidl, const WCHAR *path) ...@@ -4584,7 +4583,7 @@ static void r_verify_pidl(unsigned l, LPCITEMIDLIST pidl, const WCHAR *path)
WCHAR *strW = make_wstr(U(filename).cStr); WCHAR *strW = make_wstr(U(filename).cStr);
ok_(__FILE__,l)(!lstrcmpW(path, strW), "didn't get expected path (%s), instead: %s\n", ok_(__FILE__,l)(!lstrcmpW(path, strW), "didn't get expected path (%s), instead: %s\n",
wine_dbgstr_w(path), U(filename).cStr); wine_dbgstr_w(path), U(filename).cStr);
heap_free(strW); free(strW);
} }
IShellFolder_Release(parent); IShellFolder_Release(parent);
...@@ -4918,8 +4917,8 @@ static LRESULT CALLBACK testwindow_wndproc(HWND hwnd, UINT msg, WPARAM wparam, L ...@@ -4918,8 +4917,8 @@ static LRESULT CALLBACK testwindow_wndproc(HWND hwnd, UINT msg, WPARAM wparam, L
path2 = make_wstr(exp_data->path_2); path2 = make_wstr(exp_data->path_2);
verify_pidl(pidls[0], path1); verify_pidl(pidls[0], path1);
verify_pidl(pidls[1], path2); verify_pidl(pidls[1], path2);
heap_free(path1); free(path1);
heap_free(path2); free(path2);
exp_data->missing_events--; exp_data->missing_events--;
...@@ -5027,8 +5026,8 @@ static void test_SHChangeNotify(BOOL test_new_delivery) ...@@ -5027,8 +5026,8 @@ static void test_SHChangeNotify(BOOL test_new_delivery)
do_events(); do_events();
ok(exp_data->missing_events == 0, "%s: Expected wndproc to be called\n", exp_data->id); ok(exp_data->missing_events == 0, "%s: Expected wndproc to be called\n", exp_data->id);
heap_free(path1); free(path1);
heap_free(path2); free(path2);
} }
} }
......
...@@ -38,7 +38,6 @@ ...@@ -38,7 +38,6 @@
#include "initguid.h" #include "initguid.h"
#include "wine/heap.h"
#include "wine/test.h" #include "wine/test.h"
#include "msg.h" #include "msg.h"
...@@ -150,7 +149,7 @@ static IDataObject* IDataObjectImpl_Construct(void) ...@@ -150,7 +149,7 @@ static IDataObject* IDataObjectImpl_Construct(void)
{ {
IDataObjectImpl *obj; IDataObjectImpl *obj;
obj = heap_alloc(sizeof(*obj)); obj = malloc(sizeof(*obj));
obj->IDataObject_iface.lpVtbl = &IDataObjectImpl_Vtbl; obj->IDataObject_iface.lpVtbl = &IDataObjectImpl_Vtbl;
obj->ref = 1; obj->ref = 1;
...@@ -188,7 +187,7 @@ static ULONG WINAPI IDataObjectImpl_Release(IDataObject * iface) ...@@ -188,7 +187,7 @@ static ULONG WINAPI IDataObjectImpl_Release(IDataObject * iface)
ULONG ref = InterlockedDecrement(&This->ref); ULONG ref = InterlockedDecrement(&This->ref);
if (!ref) if (!ref)
heap_free(This); free(This);
return ref; return ref;
} }
...@@ -275,7 +274,7 @@ static IShellBrowser* IShellBrowserImpl_Construct(void) ...@@ -275,7 +274,7 @@ static IShellBrowser* IShellBrowserImpl_Construct(void)
{ {
IShellBrowserImpl *browser; IShellBrowserImpl *browser;
browser = heap_alloc(sizeof(*browser)); browser = malloc(sizeof(*browser));
browser->IShellBrowser_iface.lpVtbl = &IShellBrowserImpl_Vtbl; browser->IShellBrowser_iface.lpVtbl = &IShellBrowserImpl_Vtbl;
browser->ref = 1; browser->ref = 1;
...@@ -318,7 +317,7 @@ static ULONG WINAPI IShellBrowserImpl_Release(IShellBrowser * iface) ...@@ -318,7 +317,7 @@ static ULONG WINAPI IShellBrowserImpl_Release(IShellBrowser * iface)
ULONG ref = InterlockedDecrement(&This->ref); ULONG ref = InterlockedDecrement(&This->ref);
if (!ref) if (!ref)
heap_free(This); free(This);
return ref; return ref;
} }
......
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