libnetapi: don't reset the error code in NetUserAdd_r if the operation failed.
authorGünther Deschner <gd@samba.org>
Sun, 13 Apr 2008 17:11:01 +0000 (19:11 +0200)
committerGünther Deschner <gd@samba.org>
Sun, 13 Apr 2008 17:11:01 +0000 (19:11 +0200)
Guenther

source/lib/netapi/user.c

index f0ce26bdf8a1692dd7515d648c4648e4061cd095..7b7cb9db0568437d5fbbfb023fdf8ef6a181183c 100644 (file)
@@ -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) {