summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristophe Fergeau <cfergeau@redhat.com>2017-09-18 11:07:14 +0200
committerChristophe Fergeau <cfergeau@redhat.com>2017-09-19 12:42:57 +0200
commit2b2c5cf6aa46a73ff383e4eafe33760eb109b776 (patch)
treeab4b3cf44e75886f695d64e4321c3ba13448340d
parentb333c0d3c915d22320efe87275f1cc4f23029627 (diff)
downloadgrilo-2b2c5cf6aa46a73ff383e4eafe33760eb109b776.tar.gz
test-ui: Fix several leaks
Fixing these leaks makes it easier to spot leaks coming from the underlying libraries when running under valgrind. Signed-off-by: Christophe Fergeau <cfergeau@redhat.com> https://bugzilla.gnome.org/show_bug.cgi?id=787873
-rw-r--r--tools/grilo-test-ui/main.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/tools/grilo-test-ui/main.c b/tools/grilo-test-ui/main.c
index 0caa7ab..eaa8a72 100644
--- a/tools/grilo-test-ui/main.c
+++ b/tools/grilo-test-ui/main.c
@@ -542,8 +542,9 @@ composed_value_description (GList *values)
GString *composed = g_string_new ("");
while (values) {
- composed = g_string_append (composed,
- value_description ((GValue *) values->data));
+ char *desc = value_description ((GValue *) values->data);
+ g_string_append (composed, desc);
+ g_free (desc);
if (--length > 0) {
composed = g_string_append (composed, ", ");
}
@@ -609,6 +610,7 @@ resolve_cb (GrlSource *source,
METADATA_MODEL_VALUE, composed_value,
-1);
GRL_DEBUG (" %s: %s", key_name, composed_value);
+ g_free (composed_value);
}
i = g_list_next (i);
}
@@ -1069,6 +1071,7 @@ browser_row_selected_cb (GtkTreeView *tree_view,
gtk_widget_set_sensitive (view->remove_btn, FALSE);
}
+ gtk_tree_path_free(path);
g_object_unref (source);
g_clear_object (&content);
}