]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
add assertion to shut up clang scan
authorAlan T. DeKok <aland@freeradius.org>
Tue, 1 Dec 2020 13:56:22 +0000 (08:56 -0500)
committerAlan T. DeKok <aland@freeradius.org>
Tue, 1 Dec 2020 13:56:22 +0000 (08:56 -0500)
if the parser read a name from the string, then the dictionary
attribute MUST have been initialized

src/lib/server/tmpl_tokenize.c

index ff209a2c1629acff45758c76b54cd5bf65d5ec8d..e2190a6db7763ea3c868aff5bf030ea15c7f7d37 100644 (file)
@@ -1476,6 +1476,8 @@ static inline int tmpl_attr_afrom_attr_substr(TALLOC_CTX *ctx, tmpl_attr_error_t
         *      reference.
         */
        if (slen > 0) {
+               fr_assert(da != NULL);
+
                MEM(ar = talloc(ctx, tmpl_attr_t));
                *ar = (tmpl_attr_t){
                        .ar_num = NUM_ANY,