From: Alan T. DeKok Date: Sat, 17 Jan 2026 15:30:07 +0000 (-0500) Subject: the input value-box is already allocated in the output context X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ace250961f783348780d18b36ed945ace6ecdb3d;p=thirdparty%2Ffreeradius-server.git the input value-box is already allocated in the output context but if we're moving a child of a group, we do have to re-parent it. --- diff --git a/src/lib/unlang/xlat_builtin.c b/src/lib/unlang/xlat_builtin.c index 5f71e274872..a46027d70f4 100644 --- a/src/lib/unlang/xlat_builtin.c +++ b/src/lib/unlang/xlat_builtin.c @@ -71,7 +71,9 @@ typedef struct { void xlat_arg_copy_out(TALLOC_CTX *ctx, fr_dcursor_t *out, fr_value_box_list_t *in, fr_value_box_t *vb) { fr_value_box_list_remove(in, vb); - talloc_steal(ctx, vb); + if (talloc_parent(vb) != ctx) { + (void) talloc_steal(ctx, vb); + } fr_dcursor_append(out, vb); }