netapi32: Correctly reallocate buffer in NetWkstaUserGetInfo.

This commit is contained in:
Thomas Faber 2015-08-31 20:31:26 +02:00 committed by Alexandre Julliard
parent 637bcd5de9
commit 7164fde439
1 changed files with 5 additions and 0 deletions

View File

@ -1627,7 +1627,12 @@ NET_API_STATUS WINAPI NetWkstaUserGetInfo(LMSTR reserved, DWORD level,
(lstrlenW(ui->wkui0_username) + 1) * sizeof(WCHAR),
(LPVOID *) bufptr);
if (nastatus != NERR_Success)
{
NetApiBufferFree(ui);
return nastatus;
}
ui = (PWKSTA_USER_INFO_0) *bufptr;
ui->wkui0_username = (LMSTR) (*bufptr + sizeof(WKSTA_USER_INFO_0));
}
break;
}