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 711803 - gsubprocess: Fix a number of leaks and a segfault
gsubprocess: Fix a number of leaks and a segfault
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: gio
unspecified
Other All
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks: 711799
 
 
Reported: 2013-11-10 21:09 UTC by Stef Walter
Modified: 2013-11-11 16:48 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gsubprocess: Fix a number of leaks and a segfault (2.07 KB, patch)
2013-11-10 21:09 UTC, Stef Walter
committed Details | Review

Description Stef Walter 2013-11-10 21:09:54 UTC
These are related to the communicate async methods.
Comment 1 Stef Walter 2013-11-10 21:09:58 UTC
Created attachment 259485 [details] [review]
gsubprocess: Fix a number of leaks and a segfault

Fixed a number of leaks in gsubprocess, as well as a segfault
that was hidden by never calling g_subprocess_communicate_state_free().
Comment 2 Matthias Clasen 2013-11-11 04:40:07 UTC
...but with your patch it doesn't seem to be called either ?
Comment 3 Stef Walter 2013-11-11 05:57:24 UTC
Review of attachment 259485 [details] [review]:

::: gio/gsubprocess.c
@@ +1545,3 @@
   state->outstanding_ops++;
 
+  g_object_unref (task);

task was leaked. Now that it's called the finalizer for the task data is indeed called. Does that make sense?
Comment 4 Colin Walters 2013-11-11 16:28:50 UTC
Review of attachment 259485 [details] [review]:

Looks right...this patch is a clear benefit of having the robust leak checking.
Comment 5 Stef Walter 2013-11-11 16:48:49 UTC
Attachment 259485 [details] pushed as 1e5e3b6 - gsubprocess: Fix a number of leaks and a segfault