diff options
author | Michael Drake <Michael Drake tlsa@netsurf-browser.org> | 2020-02-24 09:54:02 +0000 |
---|---|---|
committer | Michael Drake <Michael Drake tlsa@netsurf-browser.org> | 2020-02-24 09:55:30 +0000 |
commit | e253f49b415215906d40a4a7124e08788cc46c44 (patch) | |
tree | 7645ea0cdf5b0252655fb6466c9b166d2cfbd4d7 | |
parent | 0f9419433903f40d40bfac538ca260568ee4ffdb (diff) | |
download | libcss-e253f49b415215906d40a4a7124e08788cc46c44.tar.gz libcss-e253f49b415215906d40a4a7124e08788cc46c44.tar.bz2 |
Parse: Add missing error checks for flex-flow shorthand.
Fixes scan-build: Value stored to 'error' is never read.
Signed-off-by: Michael Drake <Michael Drake tlsa@netsurf-browser.org>
-rw-r--r-- | src/parse/properties/flex_flow.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/parse/properties/flex_flow.c b/src/parse/properties/flex_flow.c index 6a83e15..e2d0e0c 100644 --- a/src/parse/properties/flex_flow.c +++ b/src/parse/properties/flex_flow.c @@ -107,15 +107,21 @@ css_error css__parse_flex_flow(css_language *c, /* defaults */ if (direction) { - error = css__stylesheet_style_appendOPV(direction_style, + error = css__stylesheet_style_appendOPV(direction_style, CSS_PROP_FLEX_DIRECTION, 0, FLEX_DIRECTION_ROW); + if (error != CSS_OK) { + goto css__parse_flex_flow_cleanup; + } } if (wrap) { - error = css__stylesheet_style_appendOPV(wrap_style, + error = css__stylesheet_style_appendOPV(wrap_style, CSS_PROP_FLEX_WRAP, 0, FLEX_WRAP_NOWRAP); + if (error != CSS_OK) { + goto css__parse_flex_flow_cleanup; + } } error = css__stylesheet_merge_style(result, direction_style); |