[gtk+] Fix memory leaks in unit tests
- From: Paolo Borelli <pborelli src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gtk+] Fix memory leaks in unit tests
- Date: Fri, 14 Aug 2009 13:56:15 +0000 (UTC)
commit 0696bc8e86df92426d68c5feedeb17050e87f84f
Author: Paolo Borelli <pborelli gnome org>
Date: Fri Aug 14 00:09:46 2009 +0200
Fix memory leaks in unit tests
gtk/tests/builder.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/gtk/tests/builder.c b/gtk/tests/builder.c
index 2a653b5..2ae604d 100644
--- a/gtk/tests/builder.c
+++ b/gtk/tests/builder.c
@@ -1951,6 +1951,8 @@ test_icon_factory (void)
gtk_icon_factory_add_default (GTK_ICON_FACTORY (factory));
image = gtk_image_new_from_stock ("apple-red", GTK_ICON_SIZE_BUTTON);
g_assert (image != NULL);
+ g_object_ref_sink (image);
+ g_object_unref (image);
g_object_unref (builder);
@@ -2136,6 +2138,7 @@ test_requires (void)
GTK_BUILDER_ERROR_VERSION_MISMATCH));
g_object_unref (builder);
g_error_free (error);
+ g_free (buffer);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]