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 711085 - Some memory leak fixes
Some memory leak fixes
Status: RESOLVED FIXED
Product: libsoup
Classification: Core
Component: Misc
unspecified
Other All
: Normal normal
: ---
Assigned To: libsoup-maint@gnome.bugs
libsoup-maint@gnome.bugs
Depends on:
Blocks:
 
 
Reported: 2013-10-29 16:57 UTC by Christophe Fergeau
Modified: 2013-11-04 14:20 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Don't leak g_get_current_dir() result (925 bytes, patch)
2013-10-29 16:57 UTC, Christophe Fergeau
committed Details | Review
socket: Don't leak GTasks (1.26 KB, patch)
2013-10-29 16:57 UTC, Christophe Fergeau
committed Details | Review

Description Christophe Fergeau 2013-10-29 16:57:37 UTC
Found while running valgrind with remote-viewer
Comment 1 Christophe Fergeau 2013-10-29 16:57:38 UTC
Created attachment 258454 [details] [review]
Don't leak g_get_current_dir() result

glib API documentation indicates:
« The returned string should be freed when no longer needed. »
Comment 2 Christophe Fergeau 2013-10-29 16:57:41 UTC
Created attachment 258455 [details] [review]
socket: Don't leak GTasks

GTask needs to be unreffed after calling g_task_return_* when we
don't use async methods which take ownership of it (as
g_task_run_in_thread() does).
Comment 3 Dan Winship 2013-11-02 22:21:13 UTC
Comment on attachment 258455 [details] [review]
socket: Don't leak GTasks

>+	g_object_unref(task);
>+	g_object_unref(task);
>+		g_object_unref(task);

space between function name and "(". OK to commit with that fix.
Comment 4 Christophe Fergeau 2013-11-04 14:20:00 UTC
Attachment 258454 [details] pushed as 51cd4fb - Don't leak g_get_current_dir() result
Attachment 258455 [details] pushed as 1ad6f7e - socket: Don't leak GTasks