summaryrefslogtreecommitdiff
path: root/source3/rpcclient/cmd_lsarpc.c
diff options
context:
space:
mode:
authorSimo Sorce <idra@samba.org>2001-08-10 09:52:10 +0000
committerSimo Sorce <idra@samba.org>2001-08-10 09:52:10 +0000
commitacc149c427e780b35ebe3028722ed0c42c4c3854 (patch)
tree064b2307dac4fbaa23c1fdab0d900b63faf04737 /source3/rpcclient/cmd_lsarpc.c
parent5c47841335059ace57dfbf03e35872504d86b447 (diff)
downloadsamba-acc149c427e780b35ebe3028722ed0c42c4c3854.tar.gz
samba-acc149c427e780b35ebe3028722ed0c42c4c3854.tar.bz2
samba-acc149c427e780b35ebe3028722ed0c42c4c3854.zip
- avoid possible mem leaks in rpcclient/cmd_*.c (talloc_destroy not performed)
- ported two rpc back from TNG (WINREG: shutdown and abort shutdown) - some optimizations and changed some DEBUG statement in loadparm.c - changed rpcclient a bit moved from non reentrant next_token_nr to next_token - in cmd_reg.c not sure if getopt will work ok on all platforms only setting optind=0 (This used to be commit fd54412ce9c3504a547e232602d6129e08dd9d4d)
Diffstat (limited to 'source3/rpcclient/cmd_lsarpc.c')
-rw-r--r--source3/rpcclient/cmd_lsarpc.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source3/rpcclient/cmd_lsarpc.c b/source3/rpcclient/cmd_lsarpc.c
index 4b07333074..a34650b807 100644
--- a/source3/rpcclient/cmd_lsarpc.c
+++ b/source3/rpcclient/cmd_lsarpc.c
@@ -53,6 +53,7 @@ static uint32 cmd_lsa_query_info_policy(struct cli_state *cli, int argc, char **
/* Initialise RPC connection */
if (!cli_nt_session_open (cli, PIPE_LSARPC)) {
DEBUG(0, ("Could not initialize samr pipe!\n"));
+ talloc_destroy(mem_ctx);
return NT_STATUS_UNSUCCESSFUL;
}
@@ -117,6 +118,7 @@ static uint32 cmd_lsa_lookup_names(struct cli_state *cli, int argc, char **argv)
/* Initialise RPC connection */
if (!cli_nt_session_open (cli, PIPE_LSARPC)) {
DEBUG(0, ("Could not initialize samr pipe!\n"));
+ talloc_destroy(mem_ctx);
return NT_STATUS_UNSUCCESSFUL;
}
@@ -185,6 +187,7 @@ static uint32 cmd_lsa_lookup_sids(struct cli_state *cli, int argc, char **argv)
/* Initialise RPC connection */
if (!cli_nt_session_open (cli, PIPE_LSARPC)) {
DEBUG(0, ("Could not initialize samr pipe!\n"));
+ talloc_destroy(mem_ctx);
return NT_STATUS_UNSUCCESSFUL;
}
@@ -277,6 +280,7 @@ static uint32 cmd_lsa_enum_trust_dom(struct cli_state *cli, int argc, char **arg
/* Initialise RPC connection */
if (!cli_nt_session_open (cli, PIPE_LSARPC)) {
DEBUG(0, ("Could not initialize samr pipe!\n"));
+ talloc_destroy(mem_ctx);
return NT_STATUS_UNSUCCESSFUL;
}