From 47dc643b0d22a50bce8feab1a4994f576a3e3afa Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 25 Apr 2017 17:08:30 -0700 Subject: [PATCH] s3: client tools: Call popt_free_cmdline_auth_info() on all normal exits. Signed-off-by: Jeremy Allison Reviewed-by: Andreas Schneider --- examples/fuse/smb2mount.c | 1 + source3/client/client.c | 3 +++ source3/rpcclient/rpcclient.c | 1 + source3/utils/smbcacls.c | 2 ++ source3/utils/smbcquotas.c | 2 ++ source3/utils/smbtree.c | 1 + 6 files changed, 10 insertions(+) diff --git a/examples/fuse/smb2mount.c b/examples/fuse/smb2mount.c index 67667bea6d0..816b0b597ad 100644 --- a/examples/fuse/smb2mount.c +++ b/examples/fuse/smb2mount.c @@ -154,6 +154,7 @@ int main(int argc, char *argv[]) return -1; } + popt_free_cmdline_auth_info(); TALLOC_FREE(frame); return 0; } diff --git a/source3/client/client.c b/source3/client/client.c index 532e2884426..64647365dc4 100644 --- a/source3/client/client.c +++ b/source3/client/client.c @@ -1525,6 +1525,7 @@ static bool do_altname(const char *name) static int cmd_quit(void) { cli_shutdown(cli); + popt_free_cmdline_auth_info(); exit(0); /* NOTREACHED */ return 0; @@ -1983,6 +1984,7 @@ static int do_put(const char *rname, const char *lname, bool reput) if (f == stdin) { cli_shutdown(cli); + popt_free_cmdline_auth_info(); exit(rc); } @@ -6003,6 +6005,7 @@ int main(int argc,char *argv[]) rc = 1; } + popt_free_cmdline_auth_info(); TALLOC_FREE(frame); return rc; } diff --git a/source3/rpcclient/rpcclient.c b/source3/rpcclient/rpcclient.c index 1d352033479..be7769672c0 100644 --- a/source3/rpcclient/rpcclient.c +++ b/source3/rpcclient/rpcclient.c @@ -1245,6 +1245,7 @@ done: if (cli != NULL) { cli_shutdown(cli); } + popt_free_cmdline_auth_info(); TALLOC_FREE(frame); return result; } diff --git a/source3/utils/smbcacls.c b/source3/utils/smbcacls.c index 76aa0d75448..11289e69e43 100644 --- a/source3/utils/smbcacls.c +++ b/source3/utils/smbcacls.c @@ -926,6 +926,7 @@ int main(int argc, char *argv[]) exit(EXIT_FAILED); } } else { + popt_free_cmdline_auth_info(); exit(0); } @@ -951,6 +952,7 @@ int main(int argc, char *argv[]) result = cacl_dump(cli, filename, numeric); } + popt_free_cmdline_auth_info(); TALLOC_FREE(frame); return result; diff --git a/source3/utils/smbcquotas.c b/source3/utils/smbcquotas.c index 8c888b34e36..031862f52a1 100644 --- a/source3/utils/smbcquotas.c +++ b/source3/utils/smbcquotas.c @@ -732,6 +732,7 @@ FSQFLAGS:QUOTA_ENABLED/DENY_DISK/LOG_SOFTLIMIT/LOG_HARD_LIMIT", "SETSTRING" }, exit(EXIT_FAILED); } } else { + popt_free_cmdline_auth_info(); exit(EXIT_OK); } @@ -756,6 +757,7 @@ FSQFLAGS:QUOTA_ENABLED/DENY_DISK/LOG_SOFTLIMIT/LOG_HARD_LIMIT", "SETSTRING" }, break; } + popt_free_cmdline_auth_info(); talloc_free(frame); return result; diff --git a/source3/utils/smbtree.c b/source3/utils/smbtree.c index f1890edcfad..fb0c130d350 100644 --- a/source3/utils/smbtree.c +++ b/source3/utils/smbtree.c @@ -322,6 +322,7 @@ int main(int argc, char *argv[]) return 1; } + popt_free_cmdline_auth_info(); TALLOC_FREE(frame); return 0; } -- 2.11.4.GIT