]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
always initialize output
authorAlan T. DeKok <aland@freeradius.org>
Mon, 20 Jun 2022 21:30:57 +0000 (17:30 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Mon, 20 Jun 2022 21:30:57 +0000 (17:30 -0400)
src/lib/unlang/xlat_expr.c

index e2fc28c63f5e48ed7de8ed9a8385debf5c6860f3..b6b57256d83756222091643c5712841585d680cb 100644 (file)
@@ -2506,7 +2506,7 @@ bool xlat_is_truthy(xlat_exp_head_t const *head, bool *out)
        /*
         *      Only pure / constant things can be truthy.
         */
-       if (!head->flags.pure) return false;
+       if (!head->flags.pure) goto return_false;
 
        node = xlat_exp_head(head);
        if (!node) {
@@ -2514,7 +2514,7 @@ bool xlat_is_truthy(xlat_exp_head_t const *head, bool *out)
                return true;
        }
 
-       if (xlat_exp_next(head, node)) return false;
+       if (xlat_exp_next(head, node)) goto return_false;
 
        if (node->type == XLAT_BOX) {
                box = &node->data;
@@ -2523,6 +2523,8 @@ bool xlat_is_truthy(xlat_exp_head_t const *head, bool *out)
                box = tmpl_value(node->vpt);
 
        } else {
+       return_false:
+               *out = false;
                return false;
        }