From: Joseph Sutton Date: Tue, 5 Sep 2023 00:20:39 +0000 (+1200) Subject: s4:kdc: Allocate variables on to more suitable memory context X-Git-Tag: tevent-0.16.0~593 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cf2bde738d62bd500f5b2a1115c8e3eecd466087;p=thirdparty%2Fsamba.git s4:kdc: Allocate variables on to more suitable memory context Signed-off-by: Joseph Sutton Reviewed-by: Andrew Bartlett --- diff --git a/source4/kdc/pac-glue.c b/source4/kdc/pac-glue.c index ee4bf26af33..f02fcdf3d6c 100644 --- a/source4/kdc/pac-glue.c +++ b/source4/kdc/pac-glue.c @@ -1825,7 +1825,7 @@ static krb5_error_code samba_kdc_make_device_info(TALLOC_CTX *mem_ctx, * so we can add them all in one go. */ device_info->domain_group_count = 1; - device_info->domain_groups = talloc_move(mem_ctx, &resource_groups); + device_info->domain_groups = talloc_move(device_info, &resource_groups); } else { device_info->domain_group_count = 0; device_info->domain_groups = NULL; @@ -1840,7 +1840,7 @@ static krb5_error_code samba_kdc_make_device_info(TALLOC_CTX *mem_ctx, goto out; } } else { - device_info->sids = talloc_realloc(mem_ctx, device_info->sids, + device_info->sids = talloc_realloc(device_info, device_info->sids, struct netr_SidAttr, device_info->sid_count + 1); if (device_info->sids == NULL) {