s3: client tools: Call popt_free_cmdline_auth_info() on all normal exits.
authorJeremy Allison <jra@samba.org>
Wed, 26 Apr 2017 00:08:30 +0000 (17:08 -0700)
committerAndreas Schneider <asn@cryptomilk.org>
Tue, 9 May 2017 07:56:09 +0000 (09:56 +0200)
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
examples/fuse/smb2mount.c
source3/client/client.c
source3/rpcclient/rpcclient.c
source3/utils/smbcacls.c
source3/utils/smbcquotas.c
source3/utils/smbtree.c

index 67667bea6d0e476d1f5ff406c9df6d735f827e73..816b0b597ad4847fe5cc8a963696d5b0b9b782a6 100644 (file)
@@ -154,6 +154,7 @@ int main(int argc, char *argv[])
                return -1;
        }
 
                return -1;
        }
 
+       popt_free_cmdline_auth_info();
        TALLOC_FREE(frame);
        return 0;
 }
        TALLOC_FREE(frame);
        return 0;
 }
index 532e2884426de66a9f2eac1583f3590e7872af0f..64647365dc4709b3c71cf73c89b334b0120f4c60 100644 (file)
@@ -1525,6 +1525,7 @@ static bool do_altname(const char *name)
 static int cmd_quit(void)
 {
        cli_shutdown(cli);
 static int cmd_quit(void)
 {
        cli_shutdown(cli);
+       popt_free_cmdline_auth_info();
        exit(0);
        /* NOTREACHED */
        return 0;
        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);
 
        if (f == stdin) {
                cli_shutdown(cli);
+               popt_free_cmdline_auth_info();
                exit(rc);
        }
 
                exit(rc);
        }
 
@@ -6003,6 +6005,7 @@ int main(int argc,char *argv[])
                rc = 1;
        }
 
                rc = 1;
        }
 
+       popt_free_cmdline_auth_info();
        TALLOC_FREE(frame);
        return rc;
 }
        TALLOC_FREE(frame);
        return rc;
 }
index 1d352033479eee940535e7907f5d7a3afa7edbcd..be7769672c0598ca7099d92d21caf1ebec98f8e3 100644 (file)
@@ -1245,6 +1245,7 @@ done:
        if (cli != NULL) {
                cli_shutdown(cli);
        }
        if (cli != NULL) {
                cli_shutdown(cli);
        }
+       popt_free_cmdline_auth_info();
        TALLOC_FREE(frame);
        return result;
 }
        TALLOC_FREE(frame);
        return result;
 }
index 76aa0d75448c68e4e24cf4ce03fbbceb9108b355..11289e69e4368dddf98b27d3ce181e58e2eb5226 100644 (file)
@@ -926,6 +926,7 @@ int main(int argc, char *argv[])
                        exit(EXIT_FAILED);
                }
        } else {
                        exit(EXIT_FAILED);
                }
        } else {
+               popt_free_cmdline_auth_info();
                exit(0);
        }
 
                exit(0);
        }
 
@@ -951,6 +952,7 @@ int main(int argc, char *argv[])
                result = cacl_dump(cli, filename, numeric);
        }
 
                result = cacl_dump(cli, filename, numeric);
        }
 
+       popt_free_cmdline_auth_info();
        TALLOC_FREE(frame);
 
        return result;
        TALLOC_FREE(frame);
 
        return result;
index 8c888b34e369c4ac81c579355486274afe1b0399..031862f52a11f24b6357df33584ec38caf33b330 100644 (file)
@@ -732,6 +732,7 @@ FSQFLAGS:QUOTA_ENABLED/DENY_DISK/LOG_SOFTLIMIT/LOG_HARD_LIMIT", "SETSTRING" },
                        exit(EXIT_FAILED);
                }
        } else {
                        exit(EXIT_FAILED);
                }
        } else {
+               popt_free_cmdline_auth_info();
                exit(EXIT_OK);
        }
 
                exit(EXIT_OK);
        }
 
@@ -756,6 +757,7 @@ FSQFLAGS:QUOTA_ENABLED/DENY_DISK/LOG_SOFTLIMIT/LOG_HARD_LIMIT", "SETSTRING" },
                        break;
        }
 
                        break;
        }
 
+       popt_free_cmdline_auth_info();
        talloc_free(frame);
 
        return result;
        talloc_free(frame);
 
        return result;
index f1890edcfad83f0f1eadf09e8ab549245e21340c..fb0c130d350f5638b72b8d8556863944148c8e9e 100644 (file)
@@ -322,6 +322,7 @@ int main(int argc, char *argv[])
                 return 1;
        }
 
                 return 1;
        }
 
+       popt_free_cmdline_auth_info();
        TALLOC_FREE(frame);
        return 0;
 }
        TALLOC_FREE(frame);
        return 0;
 }