Commit 09c0bf20 authored by Huw Davies's avatar Huw Davies Committed by Alexandre Julliard

netapi32: Free the correct pointers.

parent a3d71559
...@@ -99,6 +99,7 @@ DWORD WINAPI DsRoleGetPrimaryDomainInformation( ...@@ -99,6 +99,7 @@ DWORD WINAPI DsRoleGetPrimaryDomainInformation(
if (!Buffer) return ERROR_INVALID_PARAMETER; if (!Buffer) return ERROR_INVALID_PARAMETER;
if ((InfoLevel < DsRolePrimaryDomainInfoBasic) || (InfoLevel > DsRoleOperationState)) return ERROR_INVALID_PARAMETER; if ((InfoLevel < DsRolePrimaryDomainInfoBasic) || (InfoLevel > DsRoleOperationState)) return ERROR_INVALID_PARAMETER;
*Buffer = NULL;
switch (InfoLevel) switch (InfoLevel)
{ {
case DsRolePrimaryDomainInfoBasic: case DsRolePrimaryDomainInfoBasic:
......
...@@ -60,17 +60,17 @@ static void test_get(void) ...@@ -60,17 +60,17 @@ static void test_get(void)
SetLastError(0xdeadbeef); SetLastError(0xdeadbeef);
ret = pDsRoleGetPrimaryDomainInformation(NULL, DsRolePrimaryDomainInfoBasic, (PBYTE *)&dpdi); ret = pDsRoleGetPrimaryDomainInformation(NULL, DsRolePrimaryDomainInfoBasic, (PBYTE *)&dpdi);
ok( ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got (%d)\n", ret); ok( ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got (%d)\n", ret);
pDsRoleFreeMemory(&dpdi); pDsRoleFreeMemory(dpdi);
SetLastError(0xdeadbeef); SetLastError(0xdeadbeef);
ret = pDsRoleGetPrimaryDomainInformation(NULL, DsRoleUpgradeStatus, (PBYTE *)&dusi); ret = pDsRoleGetPrimaryDomainInformation(NULL, DsRoleUpgradeStatus, (PBYTE *)&dusi);
todo_wine { ok( ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got (%d)\n", ret); } todo_wine { ok( ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got (%d)\n", ret); }
pDsRoleFreeMemory(&dusi); pDsRoleFreeMemory(dusi);
SetLastError(0xdeadbeef); SetLastError(0xdeadbeef);
ret = pDsRoleGetPrimaryDomainInformation(NULL, DsRoleOperationState, (PBYTE *)&dosi); ret = pDsRoleGetPrimaryDomainInformation(NULL, DsRoleOperationState, (PBYTE *)&dosi);
todo_wine { ok( ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got (%d)\n", ret); } todo_wine { ok( ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got (%d)\n", ret); }
pDsRoleFreeMemory(&dosi); pDsRoleFreeMemory(dosi);
} }
......
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