From: Nick Porter Date: Sat, 9 Jan 2021 14:07:02 +0000 (+0000) Subject: Handle using radius_pairmove to add a single pair to a list in rest.c X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a92130c482a4eb651a11e879765e118a33f45bdb;p=thirdparty%2Ffreeradius-server.git Handle using radius_pairmove to add a single pair to a list in rest.c --- 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.