+2006-03-14 Carlos Garcia Campos <carlosgc@gnome.org>
+
+ * shell/ev-metadata-manager.c (parseItem):
+
+ Fix memory leaks. Fixes bug #333945
+
2006-03-13 Nickolay V. Shmyrev <nshmyrev@yandex.ru>
* NEWS, configure.ac, TODO:
ev_metadata_manager = NULL;
}
+static void
+value_free (gpointer data)
+{
+ GValue *value = (GValue *)data;
+
+ g_value_unset (value);
+ g_free (value);
+}
+
static GValue *
parse_value (xmlChar *value, xmlChar *type)
{
item->values = g_hash_table_new_full (g_str_hash,
g_str_equal,
g_free,
- g_free);
+ value_free);
cur = cur->xmlChildrenNode;
xmlChar *key;
xmlChar *xml_value;
xmlChar *type;
- GValue *value;
+ GValue *value;
key = xmlGetProp (cur, (const xmlChar *)"key");
xml_value = xmlGetProp (cur, (const xmlChar *)"value");
if (key != NULL)
xmlFree (key);
+ if (type != NULL)
+ xmlFree (type);
if (xml_value != NULL)
xmlFree (xml_value);
}
return TRUE;
}
-static void
-value_free (gpointer data)
-{
- GValue *value = (GValue *)data;
-
- g_value_unset (value);
- g_free (value);
-}
-
-
#define LAST_URI "last-used-value"
static gboolean