[gtk/matthiasc/lottie: 2/4] Fix a few bugs in the render node parser




commit b690e89e0459e6e08356ae9ba8ccc15ea2472617
Author: Matthias Clasen <mclasen redhat com>
Date:   Tue Nov 24 02:19:36 2020 -0500

    Fix a few bugs in the render node parser
    
    Two memory leaks, and one missing Escape.

 gsk/gskrendernodeparser.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/gsk/gskrendernodeparser.c b/gsk/gskrendernodeparser.c
index 976e1c1876..ade2e137c5 100644
--- a/gsk/gskrendernodeparser.c
+++ b/gsk/gskrendernodeparser.c
@@ -1816,6 +1816,8 @@ parse_fill_node (GtkCssParser *parser)
 
   result = gsk_fill_node_new (child, path, rule);
 
+  gsk_path_unref (path);
+
   gsk_render_node_unref (child);
 
   return result;
@@ -1850,6 +1852,7 @@ parse_stroke_node (GtkCssParser *parser)
 
   result = gsk_stroke_node_new (child, path, stroke);
 
+  gsk_path_unref (path);
   gsk_stroke_free (stroke);
   gsk_render_node_unref (child);
 
@@ -2416,7 +2419,7 @@ append_path_param (Printer    *p,
   char *str, *s;
 
   _indent (p);
-  g_string_append (p->str, "path: \"\n");
+  g_string_append (p->str, "path: \"\\\n");
   str = gsk_path_to_string (path);
   /* Put each command on a new line */
   for (s = str; *s; s++)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]