diff options
Diffstat (limited to 'source3/utils')
-rw-r--r-- | source3/utils/net_rpc.c | 9 | ||||
-rw-r--r-- | source3/utils/pdbedit.c | 1 |
2 files changed, 10 insertions, 0 deletions
diff --git a/source3/utils/net_rpc.c b/source3/utils/net_rpc.c index c1d812a8f0..66cb6e6ea6 100644 --- a/source3/utils/net_rpc.c +++ b/source3/utils/net_rpc.c @@ -5963,6 +5963,7 @@ static int rpc_trustdom_list(int argc, const char **argv) if (!pipe_hnd) { DEBUG(0, ("Could not initialise lsa pipe. Error was %s\n", nt_errstr(nt_status) )); + cli_shutdown(cli); talloc_destroy(mem_ctx); return -1; }; @@ -5972,6 +5973,7 @@ static int rpc_trustdom_list(int argc, const char **argv) if (NT_STATUS_IS_ERR(nt_status)) { DEBUG(0, ("Couldn't open policy handle. Error was %s\n", nt_errstr(nt_status))); + cli_shutdown(cli); talloc_destroy(mem_ctx); return -1; }; @@ -5984,6 +5986,7 @@ static int rpc_trustdom_list(int argc, const char **argv) if (NT_STATUS_IS_ERR(nt_status)) { DEBUG(0, ("LSA Query Info failed. Returned error was %s\n", nt_errstr(nt_status))); + cli_shutdown(cli); talloc_destroy(mem_ctx); return -1; } @@ -6003,6 +6006,7 @@ static int rpc_trustdom_list(int argc, const char **argv) if (NT_STATUS_IS_ERR(nt_status)) { DEBUG(0, ("Couldn't enumerate trusted domains. Error was %s\n", nt_errstr(nt_status))); + cli_shutdown(cli); talloc_destroy(mem_ctx); return -1; }; @@ -6024,6 +6028,7 @@ static int rpc_trustdom_list(int argc, const char **argv) if (NT_STATUS_IS_ERR(nt_status)) { DEBUG(0, ("Couldn't properly close lsa policy handle. Error was %s\n", nt_errstr(nt_status))); + cli_shutdown(cli); talloc_destroy(mem_ctx); return -1; }; @@ -6042,6 +6047,7 @@ static int rpc_trustdom_list(int argc, const char **argv) pipe_hnd = cli_rpc_pipe_open_noauth(cli, PI_SAMR, &nt_status); if (!pipe_hnd) { DEBUG(0, ("Could not initialise samr pipe. Error was %s\n", nt_errstr(nt_status))); + cli_shutdown(cli); talloc_destroy(mem_ctx); return -1; }; @@ -6052,6 +6058,7 @@ static int rpc_trustdom_list(int argc, const char **argv) if (!NT_STATUS_IS_OK(nt_status)) { DEBUG(0, ("Couldn't open SAMR policy handle. Error was %s\n", nt_errstr(nt_status))); + cli_shutdown(cli); talloc_destroy(mem_ctx); return -1; }; @@ -6064,6 +6071,7 @@ static int rpc_trustdom_list(int argc, const char **argv) if (!NT_STATUS_IS_OK(nt_status)) { DEBUG(0, ("Couldn't open domain object. Error was %s\n", nt_errstr(nt_status))); + cli_shutdown(cli); talloc_destroy(mem_ctx); return -1; }; @@ -6082,6 +6090,7 @@ static int rpc_trustdom_list(int argc, const char **argv) if (NT_STATUS_IS_ERR(nt_status)) { DEBUG(0, ("Couldn't enumerate accounts. Error was: %s\n", nt_errstr(nt_status))); + cli_shutdown(cli); talloc_destroy(mem_ctx); return -1; }; diff --git a/source3/utils/pdbedit.c b/source3/utils/pdbedit.c index d79ab187a3..d1a87260fa 100644 --- a/source3/utils/pdbedit.c +++ b/source3/utils/pdbedit.c @@ -573,6 +573,7 @@ static int new_user (struct pdb_methods *in, const char *username, if (sscanf(user_sid, "%d", &u_rid) != 1) { fprintf(stderr, "Error passed string is not a complete user SID or RID!\n"); + TALLOC_FREE(sam_pwent); return -1; } sid_copy(&u_sid, get_global_sam_sid()); |