summaryrefslogtreecommitdiff
path: root/source3/utils
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2020-04-11 19:03:39 +0200
committerJeremy Allison <jra@samba.org>2020-04-18 02:29:34 +0000
commit9ff5968a7f4ced23dc50b159545de71d227c47ab (patch)
tree056e334c16b057a08cc58118639bfbd0fed3e939 /source3/utils
parentaa22ae6b4051f8654b12f3a34f6b3df1a4fa74fa (diff)
downloadsamba-9ff5968a7f4ced23dc50b159545de71d227c47ab.tar.gz
smbtree: Add "fail:" target, more failure paths with follow
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'source3/utils')
-rw-r--r--source3/utils/smbtree.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/source3/utils/smbtree.c b/source3/utils/smbtree.c
index e352bccb04d..847171ffef1 100644
--- a/source3/utils/smbtree.c
+++ b/source3/utils/smbtree.c
@@ -371,6 +371,8 @@ int main(int argc, char *argv[])
POPT_TABLEEND
};
poptContext pc;
+ int result = 1;
+
/* Initialise samba stuff */
smb_init_locale();
@@ -389,13 +391,14 @@ int main(int argc, char *argv[])
/* Now do our stuff */
if (!print_tree(popt_get_cmdline_auth_info())) {
- poptFreeContext(pc);
- TALLOC_FREE(frame);
- return 1;
+ goto fail;
}
popt_free_cmdline_auth_info();
+
+ result = 0;
+fail:
poptFreeContext(pc);
TALLOC_FREE(frame);
- return 0;
+ return result;
}