expr_sort() can potentially return NULL if all sub-expressions got crushed into 'true'. This didn't happen before, but can happen with more aggressive optimizations in crush_or() in the future.
Signed-off-by: Ilya Maximets <[email protected]> --- lib/expr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/expr.c b/lib/expr.c index 8fd07b2d5..69c387140 100644 --- a/lib/expr.c +++ b/lib/expr.c @@ -2988,7 +2988,7 @@ expr_sort(struct expr *expr) } free(subs); - return expr; + return expr ? expr : expr_create_boolean(true); } static struct expr *expr_normalize_or(struct expr *expr); -- 2.39.2 _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
