]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s4:kdc: Allocate variables on to more suitable memory context
authorJoseph Sutton <josephsutton@catalyst.net.nz>
Tue, 5 Sep 2023 00:20:39 +0000 (12:20 +1200)
committerAndrew Bartlett <abartlet@samba.org>
Thu, 14 Sep 2023 21:35:29 +0000 (21:35 +0000)
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
source4/kdc/pac-glue.c

index ee4bf26af33630e09e7eb958a532df5d22b6912a..f02fcdf3d6cd9a5914ce4dfffe73755cdb03ce61 100644 (file)
@@ -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) {