diff options
author | Volker Lendecke <vlendec@samba.org> | 2006-06-13 18:01:58 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 11:17:24 -0500 |
commit | 8fa2907efd694a40f7bceb7a95e8acfe84e71000 (patch) | |
tree | dcab5a9a161d5be53de4e3c9ea781f2f4a5a2493 /source3/passdb | |
parent | 15e26314b68b6f879ac494504f9e75c90ce289a0 (diff) | |
download | samba-8fa2907efd694a40f7bceb7a95e8acfe84e71000.tar.gz samba-8fa2907efd694a40f7bceb7a95e8acfe84e71000.tar.bz2 samba-8fa2907efd694a40f7bceb7a95e8acfe84e71000.zip |
r16197: Fix Klocwork id 1338
(This used to be commit 963ae5bd144b90e71331a88029698a1a6dc52190)
Diffstat (limited to 'source3/passdb')
-rw-r--r-- | source3/passdb/secrets.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source3/passdb/secrets.c b/source3/passdb/secrets.c index ee7c441fcf..04d6da2814 100644 --- a/source3/passdb/secrets.c +++ b/source3/passdb/secrets.c @@ -1044,8 +1044,6 @@ BOOL secrets_restore_schannel_session_info(TALLOC_CTX *mem_ctx, return False; } - tdb_close(tdb_sc); - pdc = TALLOC_ZERO_P(mem_ctx, struct dcinfo); /* Retrieve the record. */ @@ -1063,6 +1061,7 @@ BOOL secrets_restore_schannel_session_info(TALLOC_CTX *mem_ctx, if (ret == -1 || l1 != 8 || l2 != 8 || l3 != 8 || l4 != 16 || l5 != 16) { /* Bad record - delete it. */ tdb_delete_bystring(tdb_sc, keystr); + tdb_close(tdb_sc); TALLOC_FREE(keystr); TALLOC_FREE(pdc); SAFE_FREE(pseed_chal); @@ -1074,6 +1073,8 @@ BOOL secrets_restore_schannel_session_info(TALLOC_CTX *mem_ctx, return False; } + tdb_close(tdb_sc); + memcpy(pdc->seed_chal.data, pseed_chal, 8); memcpy(pdc->clnt_chal.data, pclnt_chal, 8); memcpy(pdc->srv_chal.data, psrv_chal, 8); |