From acc149c427e780b35ebe3028722ed0c42c4c3854 Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Fri, 10 Aug 2001 09:52:10 +0000 Subject: - 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) --- source3/rpcclient/cmd_lsarpc.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source3/rpcclient/cmd_lsarpc.c') 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; } -- cgit