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 685069 - Leak in glib-compile-resources
Leak in glib-compile-resources
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: gio
2.32.x
Other Linux
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2012-09-28 19:39 UTC by Josselin Mouette
Modified: 2012-09-30 23:24 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fix leak in glib-compile-resources (1.56 KB, patch)
2012-09-28 19:39 UTC, Josselin Mouette
none Details | Review

Description Josselin Mouette 2012-09-28 19:39:34 UTC
Created attachment 225356 [details] [review]
Fix leak in glib-compile-resources

Commit f7abd3ce130ae3a6da8502c2dce8d773d7514464 introduced a small leak.

Same goes for 2.32.4.
Comment 1 Josselin Mouette 2012-09-30 20:27:18 UTC
Sorry for insisting, but I don’t think your patch fixes the leak.

If the g_spawn_check_exit_status calls return TRUE, stderr will never be freed. And the exit status can be 0 while stderr is non-empty.

Furthermore, the g_free calls on lines 329 & 387 are useless, since a failed g_spawn_sync is guaranteed by the API to set stderr to NULL.
Comment 2 Matthias Clasen 2012-09-30 23:24:46 UTC
Thanks for pointing that out; hope its really fixed now.