diff options
Diffstat (limited to 'source3/rpcclient')
-rw-r--r-- | source3/rpcclient/cmd_netlogon.c | 2 | ||||
-rw-r--r-- | source3/rpcclient/rpcclient.c | 7 |
2 files changed, 8 insertions, 1 deletions
diff --git a/source3/rpcclient/cmd_netlogon.c b/source3/rpcclient/cmd_netlogon.c index 3010ed5297..4933501b7a 100644 --- a/source3/rpcclient/cmd_netlogon.c +++ b/source3/rpcclient/cmd_netlogon.c @@ -87,7 +87,7 @@ void cmd_netlogon_login_test(struct client_info *info, int argc, char *argv[]) argc--; argv++; - if (argc < 2) + if (argc > 0) { nt_password = argv[0]; } diff --git a/source3/rpcclient/rpcclient.c b/source3/rpcclient/rpcclient.c index 3951b8e564..c55f99fcaf 100644 --- a/source3/rpcclient/rpcclient.c +++ b/source3/rpcclient/rpcclient.c @@ -579,6 +579,7 @@ static void cmd_quit(struct client_info *info, int argc, char *argv[]) dbgflush(); } #endif + free_connections(); exit(0); } @@ -1490,6 +1491,7 @@ static void cmd_set(struct client_info *info, int argc, char *argv[]) cli_info.dest_ip = *interpret_addr2(optarg); if (zero_ip(cli_info.dest_ip)) { + free_connections(); exit(1); } break; @@ -1707,6 +1709,7 @@ void readline_init(void) readline_init(); TimeInit(); charset_initialise(); + init_connections(); myumask = umask(0); umask(myumask); @@ -1719,6 +1722,7 @@ void readline_init(void) if (argc < 2) { usage(argv[0]); + free_connections(); exit(1); } @@ -1731,6 +1735,7 @@ void readline_init(void) if (IS_BITS_SET_ALL(cmd_set_options, CMD_HELP)) { + free_connections(); exit(0); } @@ -1740,5 +1745,7 @@ void readline_init(void) process(&cli_info, NULL); + free_connections(); + return(0); } |