1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-08 21:18:16 +03:00

lib: Avoid a tdb handle leak

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
Volker Lendecke 2023-09-23 00:50:41 -07:00 committed by Jeremy Allison
parent 46f710c95f
commit 3b8cfda1c9

View File

@ -332,4 +332,9 @@ void lpcfg_default_kdc_policy(TALLOC_CTX *mem_ctx,
if (!ctx || ( val = tdb_fetch_lifetime(ctx, "kdc:renewal_lifetime") ) == -1 )
val = lpcfg_parm_long(lp_ctx, NULL, "kdc", "renewal lifetime", 24 * 7);
*renewal_lifetime = val * 60 * 60;
if (ctx != NULL) {
tdb_close(ctx);
ctx = NULL;
}
}