After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 669372 - glib/tests memory leaks.
glib/tests memory leaks.
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: general
unspecified
Other Linux
: Normal minor
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2012-02-04 18:11 UTC by Ravi Sankar Guntur
Modified: 2012-02-15 09:42 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
glib/tests: fix memory leak (1.14 KB, patch)
2012-02-04 18:14 UTC, Ravi Sankar Guntur
committed Details | Review
fix a memory leak in mainloop test file (1.36 KB, patch)
2012-02-06 17:43 UTC, Ravi Sankar Guntur
accepted-commit_now Details | Review

Description Ravi Sankar Guntur 2012-02-04 18:11:36 UTC
memory leaks in gdatetime.c & hash.c
Comment 1 Ravi Sankar Guntur 2012-02-04 18:14:34 UTC
Created attachment 206772 [details] [review]
glib/tests: fix memory leak
Comment 2 Ravi Sankar Guntur 2012-02-06 17:43:40 UTC
Created attachment 206920 [details] [review]
fix a memory leak in mainloop test file
Comment 3 Colin Walters 2012-02-08 13:11:24 UTC
Review of attachment 206772 [details] [review]:

Both look correct.
Comment 4 Colin Walters 2012-02-08 14:24:02 UTC
Review of attachment 206920 [details] [review]:

Hmm, so the mainloop functions were just uninitialized?  This looks correct to me.

::: glib/tests/mainloop.c
@@ +84,3 @@
   g_assert (g_source_get_priority (source) == G_PRIORITY_HIGH);
 
+  g_source_unref (source);

One thing I would do here though is move this _unref() up to right below the _attach().  That's a common pattern with GSource.  I'll take care of this before pushing.
Comment 5 Colin Walters 2012-02-08 14:24:03 UTC
Review of attachment 206920 [details] [review]:

Hmm, so the mainloop functions were just uninitialized?  This looks correct to me.

::: glib/tests/mainloop.c
@@ +84,3 @@
   g_assert (g_source_get_priority (source) == G_PRIORITY_HIGH);
 
+  g_source_unref (source);

One thing I would do here though is move this _unref() up to right below the _attach().  That's a common pattern with GSource.  I'll take care of this before pushing.
Comment 6 Colin Walters 2012-02-08 14:36:57 UTC
Attachment 206772 [details] pushed as bd79c00 - glib/tests: fix memory leak