summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/passdb/secrets.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source3/passdb/secrets.c b/source3/passdb/secrets.c
index f6b1ece7d4..55fb0cfc0e 100644
--- a/source3/passdb/secrets.c
+++ b/source3/passdb/secrets.c
@@ -1051,6 +1051,8 @@ BOOL secrets_restore_schannel_session_info(TALLOC_CTX *mem_ctx,
&pdc->domain);
if (ret == -1 || l1 != 8 || l2 != 8 || l3 != 8 || l4 != 16 || l5 != 16) {
+ /* Bad record - delete it. */
+ tdb_delete_bystring(tdb_sc, keystr);
talloc_free(keystr);
talloc_free(pdc);
SAFE_FREE(pseed_chal);
@@ -1059,8 +1061,6 @@ BOOL secrets_restore_schannel_session_info(TALLOC_CTX *mem_ctx,
SAFE_FREE(psess_key);
SAFE_FREE(pmach_pw);
SAFE_FREE(value.dptr);
- /* Bad record - delete it. */
- tdb_delete_bystring(tdb_sc, keystr);
return False;
}