summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomas Bzatek <tbzatek@users.sourceforge.net>2009-10-18 13:59:14 +0200
committerTomas Bzatek <tbzatek@users.sourceforge.net>2009-10-18 13:59:14 +0200
commite5a529df046df9029e32e306c73684e16888e7b3 (patch)
tree7f031cc5b501417c7c8e06f066fa4ecd20d30dba
parent57f9ecb71cb043a315fa2d6a5f252cadf57c3980 (diff)
downloadcataract-e5a529df046df9029e32e306c73684e16888e7b3.tar.xz
Plug memory leaks
-rw-r--r--src/items.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/items.c b/src/items.c
index c21ce64..83c5368 100644
--- a/src/items.c
+++ b/src/items.c
@@ -107,11 +107,14 @@ parse_album_xml (const gchar *filename, TAlbum *index)
s = g_strdup_printf ("/gallery/items/*[%d]", i + 1);
node_name = xml_file_get_node_name (xml, s);
+ g_free (s);
if (! node_name)
continue;
if (strcmp (node_name, "item") == 0) {
item->type = INDEX_ITEM_TYPE_PICTURE;
+
+ s = g_strdup_printf ("/gallery/items/*[%d]", i + 1);
if (index->type == GALLERY_TYPE_INDEX)
item->path = xml_file_get_node_attribute (xml, s, "path");
else