summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2003-09-12 02:03:28 +0000
committerTim Potter <tpot@samba.org>2003-09-12 02:03:28 +0000
commita0fb605c2519bd3a9e3730fcb372977a52c7d25b (patch)
tree5af13ec05864c45a902d89c41f91aa1bec651c64
parentd80e9b7e42c3b474dc04a635e6494dc6bfd11fe1 (diff)
downloadsamba-a0fb605c2519bd3a9e3730fcb372977a52c7d25b.tar.gz
samba-a0fb605c2519bd3a9e3730fcb372977a52c7d25b.tar.bz2
samba-a0fb605c2519bd3a9e3730fcb372977a52c7d25b.zip
Fix another crash bug in samsync.
(This used to be commit 675707c33e8447b9cb9fc2ae451663a56a14d792)
-rw-r--r--source3/utils/net_rpc_samsync.c3
1 files changed, 3 insertions, 0 deletions
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]);