Gitweb links:
...log
http://git.netsurf-browser.org/libcss.git/shortlog/0f9419433903f40d40bfac538ca260568ee4ffdb
...commit
http://git.netsurf-browser.org/libcss.git/commit/0f9419433903f40d40bfac538ca260568ee4ffdb
...tree
http://git.netsurf-browser.org/libcss.git/tree/0f9419433903f40d40bfac538ca260568ee4ffdb
The branch, master has been updated
via 0f9419433903f40d40bfac538ca260568ee4ffdb (commit)
from 54ddec960162bb055b7dc50b1314763fbf763b60 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commitdiff
http://git.netsurf-browser.org/libcss.git/commit/?id=0f9419433903f40d40bfac538ca260568ee4ffdb
commit 0f9419433903f40d40bfac538ca260568ee4ffdb
Author: Michael Drake <Michael Drake [email protected]>
Commit: Michael Drake <Michael Drake [email protected]>
Media queries: Don't set parts before allocation has failed.
Squashes scan-build error about dereference of parts if the
allocation fails.
Signed-off-by: Michael Drake <Michael Drake [email protected]>
diff --git a/src/parse/mq.c b/src/parse/mq.c
index c6ebe84..b0e47c3 100644
--- a/src/parse/mq.c
+++ b/src/parse/mq.c
@@ -800,13 +800,13 @@ static css_error mq_parse_condition(lwc_string **strings,
}
result->negate = 1;
- result->nparts = 1;
result->parts = malloc(sizeof(*result->parts));
if (result->parts == NULL) {
css__mq_cond_or_feature_destroy(cond_or_feature);
css__mq_cond_destroy(result);
return CSS_NOMEM;
}
+ result->nparts = 1;
result->parts[0] = cond_or_feature;
*cond = result;
-----------------------------------------------------------------------
Summary of changes:
src/parse/mq.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/parse/mq.c b/src/parse/mq.c
index c6ebe84..b0e47c3 100644
--- a/src/parse/mq.c
+++ b/src/parse/mq.c
@@ -800,13 +800,13 @@ static css_error mq_parse_condition(lwc_string **strings,
}
result->negate = 1;
- result->nparts = 1;
result->parts = malloc(sizeof(*result->parts));
if (result->parts == NULL) {
css__mq_cond_or_feature_destroy(cond_or_feature);
css__mq_cond_destroy(result);
return CSS_NOMEM;
}
+ result->nparts = 1;
result->parts[0] = cond_or_feature;
*cond = result;
--
Cascading Style Sheets library
_______________________________________________
netsurf-commits mailing list
[email protected]
http://listmaster.pepperfish.net/cgi-bin/mailman/listinfo/netsurf-commits-netsurf-browser.org