From: Alan T. DeKok Date: Mon, 23 Jan 2017 20:45:58 +0000 (-0500) Subject: make node->attr a talloc'd pointer X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dfd7ad9ecefa456ccb42f1baf2a783d142f339b9;p=thirdparty%2Ffreeradius-server.git make node->attr a talloc'd pointer And move alternate into a "union" with attr. And add a "regex_index" field to the union, because we can't just steal node->attr->tmpl_num. Which was always a hack. --- diff --git a/src/main/xlat.h b/src/main/xlat.h index f95e7009b0f..123c79596dc 100644 --- a/src/main/xlat.h +++ b/src/main/xlat.h @@ -64,9 +64,14 @@ struct xlat_exp { xlat_exp_t *next; //!< Next in the list. xlat_exp_t *child; //!< Nested expansion. - xlat_exp_t *alternate; //!< Alternative expansion if this one expanded to a zero length string. - vp_tmpl_t attr; //!< An attribute template. + union { + xlat_exp_t *alternate; //!< Alternative expansion if this one expanded to a zero length string. + + vp_tmpl_t *attr; //!< An attribute template. + + int regex_index; //!< for %{1} and friends. + }; xlat_t const *xlat; //!< The xlat expansion to expand format with. };