[librsvg] RsvgFilterPrimitiveComponentTransfer: add destructor; fix memory leak



commit 76ad48b8210168869cedb1419b1e49dcf2e064a1
Author: Ron Hopper <ron boxcast com>
Date:   Mon Feb 8 15:21:08 2016 -0500

    RsvgFilterPrimitiveComponentTransfer: add destructor; fix memory leak
    
    https://bugzilla.gnome.org/show_bug.cgi?id=761728

 rsvg-filter.c |   14 ++++++++++++--
 1 files changed, 12 insertions(+), 2 deletions(-)
---
diff --git a/rsvg-filter.c b/rsvg-filter.c
index fc7f517..d0486ad 100644
--- a/rsvg-filter.c
+++ b/rsvg-filter.c
@@ -2678,6 +2678,17 @@ rsvg_filter_primitive_component_transfer_set_atts (RsvgNode * self, RsvgHandle *
     }
 }
 
+static void
+rsvg_filter_primitive_component_transfer_free (RsvgNode * self)
+{
+    RsvgFilterPrimitiveComponentTransfer *upself;
+
+    upself = (RsvgFilterPrimitiveComponentTransfer*) self;
+    g_string_free (upself->super.result, TRUE);
+    g_string_free (upself->super.in, TRUE);
+    _rsvg_node_free (self);
+}
+
 RsvgNode *
 rsvg_new_filter_primitive_component_transfer (void)
 {
@@ -2690,9 +2701,8 @@ rsvg_new_filter_primitive_component_transfer (void)
     filter->super.x.factor = filter->super.y.factor = filter->super.width.factor =
         filter->super.height.factor = 'n';
     filter->super.render = &rsvg_filter_primitive_component_transfer_render;
-
+    filter->super.super.free = &rsvg_filter_primitive_component_transfer_free;
     filter->super.super.set_atts = rsvg_filter_primitive_component_transfer_set_atts;
-
     return (RsvgNode *) filter;
 }
 


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