From a0fb605c2519bd3a9e3730fcb372977a52c7d25b Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Fri, 12 Sep 2003 02:03:28 +0000 Subject: Fix another crash bug in samsync. (This used to be commit 675707c33e8447b9cb9fc2ae451663a56a14d792) --- source3/utils/net_rpc_samsync.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'source3/utils') diff --git a/source3/utils/net_rpc_samsync.c b/source3/utils/net_rpc_samsync.c index 64f2d3f68f..d1c8300a49 100644 --- a/source3/utils/net_rpc_samsync.c +++ b/source3/utils/net_rpc_samsync.c @@ -182,6 +182,9 @@ static void dump_database(struct cli_state *cli, unsigned db_type, DOM_CRED *ret result = cli_netlogon_sam_sync(cli, mem_ctx, ret_creds, db_type, sync_context, &num_deltas, &hdr_deltas, &deltas); + if (NT_STATUS_IS_ERR(result)) + break; + clnt_deal_with_creds(cli->sess_key, &(cli->clnt_cred), ret_creds); for (i = 0; i < num_deltas; i++) { display_sam_entry(&hdr_deltas[i], &deltas[i]); -- cgit