From: Alan T. DeKok Date: Tue, 1 Dec 2020 13:56:22 +0000 (-0500) Subject: add assertion to shut up clang scan X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=41e6cb5c88af0de757ec39900edd6befd3f242e6;p=thirdparty%2Ffreeradius-server.git add assertion to shut up clang scan if the parser read a name from the string, then the dictionary attribute MUST have been initialized --- diff --git a/src/lib/server/tmpl_tokenize.c b/src/lib/server/tmpl_tokenize.c index ff209a2c162..e2190a6db77 100644 --- a/src/lib/server/tmpl_tokenize.c +++ b/src/lib/server/tmpl_tokenize.c @@ -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,