Skip to content

Commit e9bf370

Browse files
committed
Pacify coverity (CID #1644853, #1644852, #1644851, #1644850, #1644849)
1 parent 0a4e1bb commit e9bf370

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/lib/unlang/xlat_expr.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3298,6 +3298,13 @@ fr_slen_t xlat_tokenize_expression(TALLOC_CTX *ctx, xlat_exp_head_t **out, fr_sb
32983298
slen = xlat_tokenize_expression_internal(ctx, out, in, p_rules, t_rules, false);
32993299
if (slen < 0) return slen;
33003300

3301+
#ifdef STATIC_ANALYZER
3302+
/*
3303+
* Coverity doesn't realise that out will be set by this point
3304+
* by a successful call to xlat_tokenize_expression_internal.
3305+
*/
3306+
if (!out) return -1;
3307+
#endif
33013308
if (!*out) {
33023309
fr_strerror_const("Empty expressions are invalid");
33033310
return -1;
@@ -3319,6 +3326,9 @@ fr_slen_t xlat_tokenize_condition(TALLOC_CTX *ctx, xlat_exp_head_t **out, fr_sbu
33193326
slen = xlat_tokenize_expression_internal(ctx, out, in, p_rules, t_rules, true);
33203327
if (slen < 0) return slen;
33213328

3329+
#ifdef STATIC_ANALYZER
3330+
if (!out) return -1;
3331+
#endif
33223332
if (!*out) {
33233333
fr_strerror_const("Empty conditions are invalid");
33243334
return -1;

0 commit comments

Comments
 (0)