summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2017-04-25 17:08:30 -0700
committerAndreas Schneider <asn@cryptomilk.org>2017-05-09 09:56:09 +0200
commit47dc643b0d22a50bce8feab1a4994f576a3e3afa (patch)
treebcbdff7d6a4ca6e75bbe0e8115f5087ea09b3f23
parentbec0cd2ee261f68f16c7860858e1128702806f5a (diff)
downloadsamba-47dc643b0d22a50bce8feab1a4994f576a3e3afa.tar.gz
s3: client tools: Call popt_free_cmdline_auth_info() on all normal exits.
Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
-rw-r--r--examples/fuse/smb2mount.c1
-rw-r--r--source3/client/client.c3
-rw-r--r--source3/rpcclient/rpcclient.c1
-rw-r--r--source3/utils/smbcacls.c2
-rw-r--r--source3/utils/smbcquotas.c2
-rw-r--r--source3/utils/smbtree.c1
6 files changed, 10 insertions, 0 deletions
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;
}