aboutsummaryrefslogtreecommitdiffstats
path: root/filter/filter-file.c
diff options
context:
space:
mode:
Diffstat (limited to 'filter/filter-file.c')
-rw-r--r--filter/filter-file.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/filter/filter-file.c b/filter/filter-file.c
index 7d33e025d9..41c6b69c58 100644
--- a/filter/filter-file.c
+++ b/filter/filter-file.c
@@ -256,14 +256,15 @@ xml_decode (FilterElement *fe, xmlNodePtr node)
xmlFree (file->type);
file->type = type;
+ g_free (file->path);
+ file->path = NULL;
+
n = node->children;
while (n != NULL) {
if (!strcmp (n->name, type)) {
str = xmlNodeGetContent (n);
- if (str)
- file->path = g_strdup (str);
- else
- file->path = g_strdup ("");
+ file->path = g_strdup (str ? str : "");
+ xmlFree (str);
d(printf (" '%s'\n", file->path));
break;