From 57881f749495825f61f8affce921eee46fc7b728 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 19 Jan 2007 23:08:20 +0000 Subject: r20917: Fix missing error returns pointed out by "Li, Ying (ESG)" Jeremy. (This used to be commit 78387b3cd2e4eff8f09b6c498ca37b016ed9ecbc) --- source3/utils/net_rpc.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'source3') 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 " -- cgit