From 09c0bf20a1b8850f5b5ebfaa2ba4637ef8bce7b2 Mon Sep 17 00:00:00 2001 From: Huw Davies Date: Thu, 19 Jun 2008 14:13:51 +0100 Subject: [PATCH] netapi32: Free the correct pointers. --- dlls/netapi32/ds.c | 1 + dlls/netapi32/tests/ds.c | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/dlls/netapi32/ds.c b/dlls/netapi32/ds.c index 740ef5d377f..386e222ca01 100644 --- a/dlls/netapi32/ds.c +++ b/dlls/netapi32/ds.c @@ -99,6 +99,7 @@ DWORD WINAPI DsRoleGetPrimaryDomainInformation( if (!Buffer) return ERROR_INVALID_PARAMETER; if ((InfoLevel < DsRolePrimaryDomainInfoBasic) || (InfoLevel > DsRoleOperationState)) return ERROR_INVALID_PARAMETER; + *Buffer = NULL; switch (InfoLevel) { case DsRolePrimaryDomainInfoBasic: diff --git a/dlls/netapi32/tests/ds.c b/dlls/netapi32/tests/ds.c index 91119155046..277a589b8ca 100644 --- a/dlls/netapi32/tests/ds.c +++ b/dlls/netapi32/tests/ds.c @@ -60,17 +60,17 @@ static void test_get(void) SetLastError(0xdeadbeef); ret = pDsRoleGetPrimaryDomainInformation(NULL, DsRolePrimaryDomainInfoBasic, (PBYTE *)&dpdi); ok( ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got (%d)\n", ret); - pDsRoleFreeMemory(&dpdi); + pDsRoleFreeMemory(dpdi); SetLastError(0xdeadbeef); ret = pDsRoleGetPrimaryDomainInformation(NULL, DsRoleUpgradeStatus, (PBYTE *)&dusi); todo_wine { ok( ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got (%d)\n", ret); } - pDsRoleFreeMemory(&dusi); + pDsRoleFreeMemory(dusi); SetLastError(0xdeadbeef); ret = pDsRoleGetPrimaryDomainInformation(NULL, DsRoleOperationState, (PBYTE *)&dosi); todo_wine { ok( ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got (%d)\n", ret); } - pDsRoleFreeMemory(&dosi); + pDsRoleFreeMemory(dosi); }