projects
/
platform
/
upstream
/
evolution-data-server.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ca9e06f
)
Fix a potential race in operation_idle_cb().
author
Matthew Barnes
<mbarnes@redhat.com>
Wed, 15 Sep 2010 11:56:06 +0000
(07:56 -0400)
committer
Matthew Barnes
<mbarnes@redhat.com>
Wed, 15 Sep 2010 11:57:01 +0000
(07:57 -0400)
camel/camel-operation.c
patch
|
blob
|
history
diff --git
a/camel/camel-operation.c
b/camel/camel-operation.c
index
028ee29
..
e03702f
100644
(file)
--- a/
camel/camel-operation.c
+++ b/
camel/camel-operation.c
@@
-120,6
+120,11
@@
operation_idle_cb (CamelOperation *operation)
gchar *msg;
gint pc;
+ /* Keep the operation alive until we emit the signal,
+ * otherwise it might be finalized between unlocking
+ * the mutex and emitting the signal. */
+ g_object_ref (operation);
+
LOCK ();
msg = operation->priv->status_msg;
@@
-136,6
+141,8
@@
operation_idle_cb (CamelOperation *operation)
g_free (msg);
}
+ g_object_unref (operation);
+
return FALSE;
}