]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s4:kdc: Fix leak of sdb_entry
authorJoseph Sutton <josephsutton@catalyst.net.nz>
Thu, 10 Aug 2023 03:11:51 +0000 (15:11 +1200)
committerAndrew Bartlett <abartlet@samba.org>
Mon, 14 Aug 2023 04:57:34 +0000 (04:57 +0000)
We should take the common ‘out’ path to ensure that we call
sdb_entry_free() on the entry.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
source4/kdc/db-glue.c

index e6aadaf35393d442c52bb32da331a3336ec6e278..37f9734fa9192da5c9e20c421d372c538e1b2c4c 100644 (file)
@@ -1680,7 +1680,8 @@ static krb5_error_code samba_kdc_message2entry(krb5_context context,
                                             kdc_db_ctx->msg_ctx,
                                             kdc_db_ctx->ev_ctx,
                                             msg->dn);
-               return SDB_ERR_NOT_FOUND_HERE;
+               ret = SDB_ERR_NOT_FOUND_HERE;
+               goto out;
        } else {
                /*
                 * oh, no password.  Apparently (comment in