summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2019-06-05 22:08:25 +0100
committerMichael Drake <tlsa@netsurf-browser.org>2019-06-05 22:08:25 +0100
commit97ededd26cbc92c5bb214ccd99ef522ed2e8fbc8 (patch)
tree780e14ef3e5cb65100b07d46f5d3585a8463ac99
parent53dfc60094f34bbbfd3410de9165396514fd23c2 (diff)
downloadlibcss-97ededd26cbc92c5bb214ccd99ef522ed2e8fbc8.tar.gz
libcss-97ededd26cbc92c5bb214ccd99ef522ed2e8fbc8.tar.bz2
Media queries: Squash error-path leaks of feature names.
-rw-r--r--src/parse/mq.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/parse/mq.c b/src/parse/mq.c
index c5e353d..c05102c 100644
--- a/src/parse/mq.c
+++ b/src/parse/mq.c
@@ -426,7 +426,7 @@ static css_error mq_parse_range(lwc_string **strings,
/* num/dim/ident */
error = mq_populate_value(&result->value, name_or_value);
if (error != CSS_OK) {
- free(result);
+ css__mq_feature_destroy(result);
return error;
}
}
@@ -513,7 +513,7 @@ static css_error mq_parse_media_feature(lwc_string **strings,
error = mq_parse_ratio(vector, ctx, token, &ratio);
if (error != CSS_OK) {
- free(result);
+ css__mq_feature_destroy(result);
return error;
}
@@ -523,7 +523,7 @@ static css_error mq_parse_media_feature(lwc_string **strings,
/* num/dim/ident */
error = mq_populate_value(&result->value, token);
if (error != CSS_OK) {
- free(result);
+ css__mq_feature_destroy(result);
return error;
}
}