Huw Davies : netapi32: Free the correct pointers.
Alexandre Julliard
julliard at winehq.org
Fri Jun 20 06:21:42 CDT 2008
Module: wine
Branch: master
Commit: 09c0bf20a1b8850f5b5ebfaa2ba4637ef8bce7b2
URL: http://source.winehq.org/git/wine.git/?a=commit;h=09c0bf20a1b8850f5b5ebfaa2ba4637ef8bce7b2
Author: Huw Davies <huw at codeweavers.com>
Date: Thu Jun 19 14:13:51 2008 +0100
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 740ef5d..386e222 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 9111915..277a589 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);
}
More information about the wine-cvs
mailing list