]> gitweb.michael.orlitzky.com - libsvgtiny.git/blobdiff - src/svgtiny.c
Fix various bugs which caused ASAN and UBSAN to be upset
[libsvgtiny.git] / src / svgtiny.c
index 69cbcf7125b2f7ae540d5743e40be7d0edf3200f..8831b92111a67699b88fc5c91c56c31559fdb073 100644 (file)
@@ -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;
                }
        }