]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s4:kdc: Free samba_kdc_seq context on failure to allocate memory
authorJoseph Sutton <josephsutton@catalyst.net.nz>
Thu, 10 Aug 2023 03:54:21 +0000 (15:54 +1200)
committerAndrew Bartlett <abartlet@samba.org>
Mon, 14 Aug 2023 04:57:34 +0000 (04:57 +0000)
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
source4/kdc/db-glue.c

index 22990e5133ed13d443b090036b0f373c1c8cfe1c..4230ca3543c8a6a545f9765280b4f0e23c71847c 100644 (file)
@@ -2992,7 +2992,7 @@ static krb5_error_code samba_kdc_seq(krb5_context context,
        if (!mem_ctx) {
                ret = ENOMEM;
                krb5_set_error_message(context, ret, "samba_kdc_seq: talloc_named() failed!");
-               return ret;
+               goto out;
        }
 
        while (priv->index < priv->count) {