Merge lp:~mterry/indicator-application/double-free-on-cancel into lp:indicator-application/0.4

Proposed by Michael Terry
Status: Merged
Merged at revision: 197
Proposed branch: lp:~mterry/indicator-application/double-free-on-cancel
Merge into: lp:indicator-application/0.4
Diff against target: 15 lines (+5/-0)
1 file modified
src/application-service-appstore.c (+5/-0)
To merge this branch: bzr merge lp:~mterry/indicator-application/double-free-on-cancel
Reviewer Review Type Date Requested Status
Indicator Applet Developers Pending
Review via email: mp+57168@code.launchpad.net

Description of the change

I missed this cancel-callback bug last time I made a sweep. This one would result in a double-application-free if it were triggered.

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/application-service-appstore.c'
2--- src/application-service-appstore.c 2011-04-07 14:10:11 +0000
3+++ src/application-service-appstore.c 2011-04-11 13:54:24 +0000
4@@ -1110,6 +1110,11 @@
5
6 GDBusProxy * proxy = g_dbus_proxy_new_for_bus_finish(res, &error);
7
8+ if (g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) {
9+ g_error_free (error);
10+ return; // Must exit before accessing freed memory
11+ }
12+
13 if (app->props_cancel != NULL) {
14 g_object_unref(app->props_cancel);
15 app->props_cancel = NULL;

Subscribers

People subscribed via source and target branches