diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2024-08-12 16:59:44 -0400 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2024-08-12 16:59:44 -0400 |
commit | 4b2c8f05fa84b5d05ab3d83ebf190236d1b71561 (patch) | |
tree | 4469788d95c3ee9b15c4eefdabe40a06387f0682 | |
parent | 1234d764ba3059eb2314cb50a2790240ed7ac630 (diff) | |
download | bfs-4b2c8f05fa84b5d05ab3d83ebf190236d1b71561.tar.xz |
opt: Add a missing NULL check in lift_andor_not()
The annotation visitor probably can't fail, but we might as well check
consistently.
-rw-r--r-- | src/opt.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -1980,6 +1980,10 @@ static struct bfs_expr *lift_andor_not(struct bfs_opt *opt, struct bfs_expr *exp } expr = visit_shallow(opt, expr, &annotate); + if (!expr) { + return NULL; + } + return negate_expr(opt, expr, &fake_not_arg); } |