projects
/
reactos.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
[NETAPI32]
[reactos.git]
/
reactos
/
dll
/
win32
/
netapi32
/
user.c
diff --git
a/reactos/dll/win32/netapi32/user.c
b/reactos/dll/win32/netapi32/user.c
index
291a3e5
..
bcfd21f
100644
(file)
--- a/
reactos/dll/win32/netapi32/user.c
+++ b/
reactos/dll/win32/netapi32/user.c
@@
-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);