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 692202 - gfile: don't report completion twice on g_file_load_contents error
gfile: don't report completion twice on g_file_load_contents error
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: gio
unspecified
Other All
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
: 692444 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2013-01-21 14:48 UTC by Cosimo Cecchi
Modified: 2013-01-24 12:58 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gfile: don't report completion twice on g_file_load_contents error (1.43 KB, patch)
2013-01-21 14:48 UTC, Cosimo Cecchi
committed Details | Review

Description Cosimo Cecchi 2013-01-21 14:48:33 UTC
A regression from the port to GTask
Comment 1 Cosimo Cecchi 2013-01-21 14:48:34 UTC
Created attachment 234011 [details] [review]
gfile: don't report completion twice on g_file_load_contents error

When an error occurs while reading the file input stream in
g_file_load_contents (e.g. because the operation was cancelled), the
code is correctly calling g_task_return_error(), but in the callback
from the close operation, g_task_return_boolean() will be called again.

Code that cleans up its state in the async callback will then be called
twice, leading to invalid memory access.
Comment 2 Dan Winship 2013-01-21 15:34:09 UTC
Comment on attachment 234011 [details] [review]
gfile: don't report completion twice on g_file_load_contents error

looks right
Comment 3 Cosimo Cecchi 2013-01-21 15:37:03 UTC
Attachment 234011 [details] pushed as e908b50 - gfile: don't report completion twice on g_file_load_contents error
Comment 4 Cosimo Cecchi 2013-01-24 12:58:59 UTC
*** Bug 692444 has been marked as a duplicate of this bug. ***