oledb32/tests: Simplify IMalloc handling.

This commit is contained in:
Nikolay Sivov 2014-05-04 20:34:27 +04:00 committed by Alexandre Julliard
parent 3804423f8c
commit 51a4fce54d
2 changed files with 2 additions and 14 deletions

View file

@ -1,5 +1,5 @@
TESTDLL = oledb32.dll
IMPORTS = uuid shell32 oleaut32 ole32 user32 gdi32 advapi32
IMPORTS = uuid oleaut32 ole32 user32 gdi32 advapi32
C_SRCS = \
convert.c \

View file

@ -29,7 +29,6 @@
#include "ole2.h"
#include "msdadc.h"
#include "msdasc.h"
#include "shlobj.h"
#include "msdaguid.h"
#include "initguid.h"
#include "oledberr.h"
@ -56,14 +55,6 @@ static void test_GetDataSource(WCHAR *initstring)
if(SUCCEEDED(hr))
{
IDBProperties *props = NULL;
IMalloc *ppM = NULL;
hr = SHGetMalloc(&ppM);
if (FAILED(hr))
{
ok(0, "Couldn't get IMalloc object.\n");
goto end;
}
hr = IDBInitialize_QueryInterface(dbinit, &IID_IDBProperties, (void**)&props);
ok(hr == S_OK, "got %08x\n", hr);
@ -84,15 +75,12 @@ static void test_GetDataSource(WCHAR *initstring)
pInfoset->rgPropertyInfos[i].vtType);
}
IMalloc_Free(ppM, ary);
CoTaskMemFree(ary);
}
IDBProperties_Release(props);
}
IMalloc_Release(ppM);
end:
IDBInitialize_Release(dbinit);
}