From: Alan T. DeKok Date: Fri, 1 Oct 2021 15:41:29 +0000 (-0400) Subject: use cf_pair_dup() to get parsed, filename, line, etc. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1654f2ecaeefac93cbe109c792d0b4a7c71a0be9;p=thirdparty%2Ffreeradius-server.git use cf_pair_dup() to get parsed, filename, line, etc. --- diff --git a/src/lib/server/cf_util.c b/src/lib/server/cf_util.c index f54e14c6d9..70dd444a54 100644 --- a/src/lib/server/cf_util.c +++ b/src/lib/server/cf_util.c @@ -1234,7 +1234,9 @@ int cf_pair_replace(CONF_SECTION *cs, CONF_PAIR *cp, char const *value) /* * Add the new CONF_PAIR */ - MEM(new_cp = cf_pair_alloc(cs, cp->attr, value, cp->op, cp->lhs_quote, cp->rhs_quote)); + MEM(new_cp = cf_pair_dup(cs, cp)); + talloc_const_free(cp->value); + MEM(cp->value = talloc_typed_strdup(cp, value)); return 0; }