From: Joseph Sutton Date: Fri, 16 Jun 2023 03:02:35 +0000 (+1200) Subject: s4:kdc: Use talloc_get_type_abort() X-Git-Tag: talloc-2.4.1~197 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b1006c773be1d28a15eeab37c7e49675d3a1dedd;p=thirdparty%2Fsamba.git s4:kdc: Use talloc_get_type_abort() We subsequently dereference the result without performing a NULL check. Signed-off-by: Joseph Sutton Reviewed-by: Andrew Bartlett --- diff --git a/source4/kdc/wdc-samba4.c b/source4/kdc/wdc-samba4.c index 30a469a9f35..8120efd6af3 100644 --- a/source4/kdc/wdc-samba4.c +++ b/source4/kdc/wdc-samba4.c @@ -684,7 +684,7 @@ static krb5_error_code samba_wdc_check_client_access(void *priv, return ENOMEM; } - kdc_entry = talloc_get_type(client->context, struct samba_kdc_entry); + kdc_entry = talloc_get_type_abort(client->context, struct samba_kdc_entry); password_change = (kdc_request_get_server(r) && kdc_request_get_server(r)->flags.change_pw); workstation = get_netbios_name(tmp_ctx, kdc_request_get_req(r)->req_body.addresses);