From: Joseph Sutton Date: Tue, 7 Nov 2023 03:22:41 +0000 (+1300) Subject: s4:kdc: Move return code checks closer to where the return codes are set X-Git-Tag: talloc-2.4.2~815 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2733cd7b4c8b6a65a764eb7710a0f3f755f96675;p=thirdparty%2Fsamba.git s4:kdc: Move return code checks closer to where the return codes are set Signed-off-by: Joseph Sutton Reviewed-by: Andrew Bartlett --- diff --git a/source4/kdc/pac-glue.c b/source4/kdc/pac-glue.c index 21e8acf6e00..abd6d138af1 100644 --- a/source4/kdc/pac-glue.c +++ b/source4/kdc/pac-glue.c @@ -2933,6 +2933,9 @@ krb5_error_code samba_kdc_update_pac(TALLOC_CTX *mem_ctx, new_pac, type, (type_data.data != NULL) ? &type_data : &null_data); + if (code != 0) { + goto done; + } } else { code = krb5_pac_get_buffer(context, client.pac, @@ -2950,10 +2953,9 @@ krb5_error_code samba_kdc_update_pac(TALLOC_CTX *mem_ctx, type, (type_data.data != NULL) ? &type_data : &null_data); smb_krb5_free_data_contents(context, &type_data); - } - - if (code != 0) { - goto done; + if (code != 0) { + goto done; + } } }