summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/utils/nmblookup.c3
-rw-r--r--source3/utils/pdbedit.c3
-rw-r--r--source3/utils/sharesec.c2
-rw-r--r--source3/utils/smbcacls.c2
-rw-r--r--source3/utils/smbcquotas.c3
-rw-r--r--source3/utils/smbfilter.c2
-rw-r--r--source3/utils/smbget.c3
-rw-r--r--source3/utils/smbpasswd.c6
-rw-r--r--source3/utils/smbtree.c6
9 files changed, 24 insertions, 6 deletions
diff --git a/source3/utils/nmblookup.c b/source3/utils/nmblookup.c
index 8bb8023917..bf158fe4a0 100644
--- a/source3/utils/nmblookup.c
+++ b/source3/utils/nmblookup.c
@@ -193,6 +193,7 @@ int main(int argc,char *argv[])
static BOOL find_master=False;
static BOOL lookup_by_ip = False;
poptContext pc;
+ TALLOC_CTX *frame = talloc_stackframe();
struct poptOption long_options[] = {
POPT_AUTOHELP
@@ -292,6 +293,6 @@ int main(int argc,char *argv[])
}
poptFreeContext(pc);
-
+ TALLOC_FREE(frame);
return(0);
}
diff --git a/source3/utils/pdbedit.c b/source3/utils/pdbedit.c
index c5a132a55d..cea2cd7cfa 100644
--- a/source3/utils/pdbedit.c
+++ b/source3/utils/pdbedit.c
@@ -758,6 +758,7 @@ int main (int argc, char **argv)
static BOOL pw_from_stdin = False;
struct pdb_methods *bin, *bout, *bdef;
char *configfile = NULL;
+ TALLOC_CTX *frame = talloc_stackframe();
poptContext pc;
struct poptOption long_options[] = {
POPT_AUTOHELP
@@ -798,6 +799,7 @@ int main (int argc, char **argv)
/* we shouldn't have silly checks like this */
if (getuid() != 0) {
d_fprintf(stderr, "You must be root to use pdbedit\n");
+ TALLOC_FREE(frame);
return -1;
}
@@ -1050,5 +1052,6 @@ int main (int argc, char **argv)
}
poptPrintHelp(pc, stderr, 0);
+ TALLOC_FREE(frame);
return 1;
}
diff --git a/source3/utils/sharesec.c b/source3/utils/sharesec.c
index a1774d698e..45bde5cf8e 100644
--- a/source3/utils/sharesec.c
+++ b/source3/utils/sharesec.c
@@ -507,7 +507,7 @@ int main(int argc, const char *argv[])
{ NULL }
};
- if ( !(ctx = talloc_init("main")) ) {
+ if ( !(ctx = talloc_stackframe()) ) {
fprintf( stderr, "Failed to initialize talloc context!\n");
return -1;
}
diff --git a/source3/utils/smbcacls.c b/source3/utils/smbcacls.c
index db81b447a1..6324dcc192 100644
--- a/source3/utils/smbcacls.c
+++ b/source3/utils/smbcacls.c
@@ -824,7 +824,7 @@ static struct cli_state *connect_one(const char *share)
load_case_tables();
- ctx=talloc_init("main");
+ ctx=talloc_stackframe();
/* set default debug level to 1 regardless of what smb.conf sets */
setup_logging( "smbcacls", True );
diff --git a/source3/utils/smbcquotas.c b/source3/utils/smbcquotas.c
index 70d28a7e4a..8d954ac20a 100644
--- a/source3/utils/smbcquotas.c
+++ b/source3/utils/smbcquotas.c
@@ -401,6 +401,7 @@ static struct cli_state *connect_one(const char *share)
struct cli_state *cli;
BOOL fix_user = False;
SMB_NTQUOTA_STRUCT qt;
+ TALLOC_CTX *frame = talloc_stackframe();
poptContext pc;
struct poptOption long_options[] = {
POPT_AUTOHELP
@@ -544,6 +545,8 @@ FSQFLAGS:QUOTA_ENABLED/DENY_DISK/LOG_SOFTLIMIT/LOG_HARD_LIMIT", "SETSTRING" },
break;
}
+ talloc_free(frame);
+
return result;
}
diff --git a/source3/utils/smbfilter.c b/source3/utils/smbfilter.c
index 450adc41ef..b3c038c0cf 100644
--- a/source3/utils/smbfilter.c
+++ b/source3/utils/smbfilter.c
@@ -220,6 +220,7 @@ int main(int argc, char *argv[])
{
char *desthost;
pstring configfile;
+ TALLOC_CTX *frame = talloc_stackframe();
setup_logging(argv[0],True);
@@ -240,5 +241,6 @@ int main(int argc, char *argv[])
}
start_filter(desthost);
+ TALLOC_FREE(frame);
return 0;
}
diff --git a/source3/utils/smbget.c b/source3/utils/smbget.c
index 5848fd4057..ac662e6ace 100644
--- a/source3/utils/smbget.c
+++ b/source3/utils/smbget.c
@@ -521,6 +521,7 @@ int main(int argc, const char **argv)
int c = 0;
const char *file = NULL;
char *rcfile = NULL;
+ TALLOC_CTX *frame = talloc_stackframe();
struct poptOption long_options[] = {
{"guest", 'a', POPT_ARG_NONE, NULL, 'a', "Work as user guest" },
{"resume", 'r', POPT_ARG_NONE, &_resume, 0, "Automatically resume aborted files" },
@@ -597,6 +598,6 @@ int main(int argc, const char **argv)
}
clean_exit();
-
+ TALLOC_FREE(frame);
return 0;
}
diff --git a/source3/utils/smbpasswd.c b/source3/utils/smbpasswd.c
index 1da9b5e528..f1a2387090 100644
--- a/source3/utils/smbpasswd.c
+++ b/source3/utils/smbpasswd.c
@@ -550,7 +550,9 @@ static int process_nonroot(int local_flags)
**********************************************************/
int main(int argc, char **argv)
{
+ TALLOC_CTX *frame = talloc_stackframe();
int local_flags = 0;
+ int ret;
AllowDebugChange = False;
@@ -587,5 +589,7 @@ int main(int argc, char **argv)
return process_root(local_flags);
}
- return process_nonroot(local_flags);
+ ret = process_nonroot(local_flags);
+ TALLOC_FREE(frame);
+ return ret;
}
diff --git a/source3/utils/smbtree.c b/source3/utils/smbtree.c
index b30ce08c5a..a29aa52fef 100644
--- a/source3/utils/smbtree.c
+++ b/source3/utils/smbtree.c
@@ -249,6 +249,7 @@ static BOOL print_tree(struct user_auth_info *user_info)
****************************************************************************/
int main(int argc,char *argv[])
{
+ TALLOC_CTX *frame = talloc_stackframe();
struct poptOption long_options[] = {
POPT_AUTOHELP
{ "broadcast", 'b', POPT_ARG_VAL, &use_bcast, True, "Use broadcast instead of using the master browser" },
@@ -289,8 +290,11 @@ static BOOL print_tree(struct user_auth_info *user_info)
/* Now do our stuff */
- if (!print_tree(&cmdline_auth_info))
+ if (!print_tree(&cmdline_auth_info)) {
+ TALLOC_FREE(frame);
return 1;
+ }
+ TALLOC_FREE(frame);
return 0;
}