From a92130c482a4eb651a11e879765e118a33f45bdb Mon Sep 17 00:00:00 2001 From: Nick Porter Date: Sat, 9 Jan 2021 14:07:02 +0000 Subject: [PATCH] Handle using radius_pairmove to add a single pair to a list in rest.c --- src/modules/rlm_rest/rest.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/modules/rlm_rest/rest.c b/src/modules/rlm_rest/rest.c index 5359856989..6d5c43c809 100644 --- a/src/modules/rlm_rest/rest.c +++ b/src/modules/rlm_rest/rest.c @@ -1158,7 +1158,11 @@ static int json_pair_alloc(rlm_rest_t const *instance, rlm_rest_section_t const RINDENT(); RDEBUG2("&%s:%pP", fr_table_str_by_value(pair_list_table, tmpl_list(dst), ""), vp); REXDENT(); - radius_pairmove(current, vps, &vp, false); + + fr_pair_list_t tmp_list; + fr_pair_list_init(&tmp_list); + fr_pair_add(&tmp_list, vp); + radius_pairmove(current, vps, &tmp_list, false); /* * If we call json_object_array_get_idx on something that's not an array * the behaviour appears to be to occasionally segfault. -- 2.47.2