From 8b42b87e23dd3bd6d3a3e5c8f7693852f33087be Mon Sep 17 00:00:00 2001 From: Daniel Silverstone Date: Sun, 29 Jul 2018 10:20:38 +0100 Subject: Fix various bugs which caused ASAN and UBSAN to be upset --- src/svgtiny.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/svgtiny.c') diff --git a/src/svgtiny.c b/src/svgtiny.c index 69cbcf7..8831b92 100644 --- a/src/svgtiny.c +++ b/src/svgtiny.c @@ -457,6 +457,7 @@ svgtiny_code svgtiny_parse_path(dom_element *path, /* empty path is permitted it just disables the path */ palloc = dom_string_byte_length(path_d_str); if (palloc == 0) { + dom_string_unref(path_d_str); svgtiny_cleanup_state_local(&state); return svgtiny_OK; } @@ -708,7 +709,7 @@ svgtiny_code svgtiny_parse_path(dom_element *path, &x, &y, &n) == 7); } else { - fprintf(stderr, "parse failed at \"%s\"\n", s); + /* fprintf(stderr, "parse failed at \"%s\"\n", s); */ break; } } -- cgit v1.2.3