From 9edb067f62b1e36f1da461b3eb09cb123d2089dd Mon Sep 17 00:00:00 2001 From: =?utf8?q?G=C3=BCnther=20Deschner?= Date: Sun, 13 Apr 2008 19:11:01 +0200 Subject: [PATCH] libnetapi: don't reset the error code in NetUserAdd_r if the operation failed. Guenther --- source/lib/netapi/user.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/source/lib/netapi/user.c b/source/lib/netapi/user.c index f0ce26bdf8a..7b7cb9db056 100644 --- a/source/lib/netapi/user.c +++ b/source/lib/netapi/user.c @@ -320,12 +320,8 @@ WERROR NetUserAdd_r(struct libnetapi_ctx *ctx, goto done; failed: - status = rpccli_samr_DeleteUser(pipe_cli, ctx, - &user_handle); - if (!NT_STATUS_IS_OK(status)) { - werr = ntstatus_to_werror(status); - goto done; - } + rpccli_samr_DeleteUser(pipe_cli, ctx, + &user_handle); done: if (!cli) { -- 2.47.3