mirror of
https://github.com/reactos/reactos.git
synced 2024-06-29 01:12:06 +00:00
[NETAPI32]
NetuserAdd: Delete the newly create user account if user information could not be set. svn path=/trunk/; revision=60184
This commit is contained in:
parent
e44be02d25
commit
8c64e4dd16
|
@ -2096,7 +2096,12 @@ NetUserAdd(LPCWSTR servername,
|
|||
|
||||
done:
|
||||
if (UserHandle != NULL)
|
||||
SamCloseHandle(UserHandle);
|
||||
{
|
||||
if (ApiStatus != NERR_Success)
|
||||
SamDeleteUser(UserHandle);
|
||||
else
|
||||
SamCloseHandle(UserHandle);
|
||||
}
|
||||
|
||||
if (DomainHandle != NULL)
|
||||
SamCloseHandle(DomainHandle);
|
||||
|
|
Loading…
Reference in a new issue