summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2007-01-19 23:08:20 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:17:20 -0500
commit57881f749495825f61f8affce921eee46fc7b728 (patch)
tree02f688172f85a5543c3a8f78d491f2456b6fb25c
parentaacd16e7c4bea5018560eea09d55f2a6473be84d (diff)
downloadsamba-57881f749495825f61f8affce921eee46fc7b728.tar.gz
samba-57881f749495825f61f8affce921eee46fc7b728.tar.bz2
samba-57881f749495825f61f8affce921eee46fc7b728.zip
r20917: Fix missing error returns pointed out by "Li, Ying (ESG)" <ying.li2@hp.com>
Jeremy. (This used to be commit 78387b3cd2e4eff8f09b6c498ca37b016ed9ecbc)
-rw-r--r--source3/utils/net_rpc.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/source3/utils/net_rpc.c b/source3/utils/net_rpc.c
index 29fba09eb7..94708ad2cc 100644
--- a/source3/utils/net_rpc.c
+++ b/source3/utils/net_rpc.c
@@ -5545,6 +5545,7 @@ static int rpc_trustdom_establish(int argc, const char **argv)
if (NT_STATUS_IS_ERR(nt_status)) {
DEBUG(0, ("Couldn't connect to domain %s controller. Error was %s.\n",
domain_name, nt_errstr(nt_status)));
+ return -1;
}
/*
@@ -5554,6 +5555,8 @@ static int rpc_trustdom_establish(int argc, const char **argv)
if (!cli_get_pdc_name(cli, domain_name, (char*)pdc_name)) {
DEBUG(0, ("NetServerEnum2 error: Couldn't find primary domain controller\
for domain %s\n", domain_name));
+ cli_shutdown(cli);
+ return -1;
}
if (!(mem_ctx = talloc_init("establishing trust relationship to "