From 622b5b525a488b02353b8998267ff08bee6a605b Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Mon, 24 Feb 2020 10:07:51 +0000 Subject: Parse: Add missing error checks for list-style shorthand. Fixes scan-build: Value stored to 'error' is never read. Signed-off-by: Michael Drake --- src/parse/properties/list_style.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/parse/properties/list_style.c b/src/parse/properties/list_style.c index f12fa2e..b2c8de3 100644 --- a/src/parse/properties/list_style.c +++ b/src/parse/properties/list_style.c @@ -122,20 +122,29 @@ css_error css__parse_list_style(css_language *c, /* defaults */ if (image) { error = css__stylesheet_style_appendOPV(image_style, - CSS_PROP_LIST_STYLE_IMAGE, + CSS_PROP_LIST_STYLE_IMAGE, 0, LIST_STYLE_IMAGE_NONE); + if (error != CSS_OK) { + goto css__parse_list_style_cleanup; + } } if (position) { error = css__stylesheet_style_appendOPV(position_style, - CSS_PROP_LIST_STYLE_POSITION, + CSS_PROP_LIST_STYLE_POSITION, 0, LIST_STYLE_POSITION_OUTSIDE); + if (error != CSS_OK) { + goto css__parse_list_style_cleanup; + } } if (type) { error = css__stylesheet_style_appendOPV(type_style, - CSS_PROP_LIST_STYLE_TYPE, + CSS_PROP_LIST_STYLE_TYPE, 0, LIST_STYLE_TYPE_DISC); + if (error != CSS_OK) { + goto css__parse_list_style_cleanup; + } } -- cgit v1.2.3