diff options
author | Morten Welinder <terra@gnome.org> | 2004-10-04 19:12:30 +0000 |
---|---|---|
committer | Morten Welinder <mortenw@src.gnome.org> | 2004-10-04 19:12:30 +0000 |
commit | b5dd5e5b8114cbf66594fdfba2f94ed3a810a8dc (patch) | |
tree | 0c509841a565d338e37000436d89decf79eb2e57 | |
parent | c3dc6ef23687ee2a3368163c675d0cbdff3bc9c5 (diff) | |
download | glade-b5dd5e5b8114cbf66594fdfba2f94ed3a810a8dc.tar.gz |
Plug leak.
2004-10-04 Morten Welinder <terra@gnome.org>
* src/glade-catalog.c (glade_catalog_load): Plug leak.
* src/glade-property-class.c
(glade_property_class_update_from_node): Plug leak.
(glade_property_class_update_from_node): Plug leak.
* src/glade-xml-utils.c (glade_xml_context_destroy): Plug leak.
* src/glade-widget-class.c (glade_widget_class_extend_with_file):
Plug leaks.
-rw-r--r-- | ChangeLog | 11 | ||||
-rw-r--r-- | src/glade-catalog.c | 1 | ||||
-rw-r--r-- | src/glade-property-class.c | 2 | ||||
-rw-r--r-- | src/glade-widget-class.c | 5 | ||||
-rw-r--r-- | src/glade-xml-utils.c | 1 |
5 files changed, 19 insertions, 1 deletions
@@ -1,5 +1,16 @@ 2004-10-04 Morten Welinder <terra@gnome.org> + * src/glade-catalog.c (glade_catalog_load): Plug leak. + + * src/glade-property-class.c + (glade_property_class_update_from_node): Plug leak. + (glade_property_class_update_from_node): Plug leak. + + * src/glade-xml-utils.c (glade_xml_context_destroy): Plug leak. + + * src/glade-widget-class.c (glade_widget_class_extend_with_file): + Plug leaks. + * src/glade-widget.c (glade_widget_finalize): Don't try to destroy a hash table with g_object_unref. (glade_widget_dispose): Glade properties are not GObjects, so diff --git a/src/glade-catalog.c b/src/glade-catalog.c index 7c32dfeb..24dc13f7 100644 --- a/src/glade-catalog.c +++ b/src/glade-catalog.c @@ -153,6 +153,7 @@ glade_catalog_load (const char *base_catalog_filename) glade_xml_context_free (context); g_free (catalog_filename); + g_free (base_library); return catalog; lblError: diff --git a/src/glade-property-class.c b/src/glade-property-class.c index e02542ec..6f68b96c 100644 --- a/src/glade-property-class.c +++ b/src/glade-property-class.c @@ -818,6 +818,7 @@ glade_property_class_update_from_node (GladeXmlNode *node, if (!type_name) break; type = g_type_from_name (type_name); + g_free (type_name); if (!(type != 0)) break; class->enum_type = type; @@ -844,6 +845,7 @@ glade_property_class_update_from_node (GladeXmlNode *node, g_free (class->def); } class->def = glade_property_class_make_gvalue_from_string (class, buff); + g_free (buff); if (!class->def) return FALSE; } diff --git a/src/glade-widget-class.c b/src/glade-widget-class.c index e33c7850..0e9e63b3 100644 --- a/src/glade-widget-class.c +++ b/src/glade-widget-class.c @@ -364,8 +364,10 @@ glade_widget_class_extend_with_file (GladeWidgetClass *widget_class, const char doc = glade_xml_context_get_doc (context); node = glade_xml_doc_get_root (doc); - if (!doc || !node) + if (!doc || !node) { + glade_xml_context_destroy (context); return FALSE; + } replace_child_function_name = glade_xml_get_value_string (node, GLADE_TAG_REPLACE_CHILD_FUNCTION); if (replace_child_function_name && widget_class->module) @@ -435,6 +437,7 @@ glade_widget_class_extend_with_file (GladeWidgetClass *widget_class, const char property_class->packing = TRUE; } + glade_xml_context_destroy (context); return TRUE; } diff --git a/src/glade-xml-utils.c b/src/glade-xml-utils.c index b7d0dd7b..34000ab8 100644 --- a/src/glade-xml-utils.c +++ b/src/glade-xml-utils.c @@ -503,6 +503,7 @@ void glade_xml_context_destroy (GladeXmlContext *context) { g_return_if_fail (context != NULL); + xmlFreeDoc ((xmlDoc*)context->doc); g_free (context); } |