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:
0eeb603
)
[http calendar] Ref backend inside source_changed_cb()
author
Milan Crha
<mcrha@redhat.com>
Wed, 9 Jan 2013 14:41:10 +0000
(15:41 +0100)
committer
Milan Crha
<mcrha@redhat.com>
Wed, 9 Jan 2013 14:41:10 +0000
(15:41 +0100)
In certain situation, the backend can be freed while the callback
is still in action, then the factory can crash inside
cal_backend_http_ensure_uri() or such.
calendar/backends/http/e-cal-backend-http.c
patch
|
blob
|
history
diff --git
a/calendar/backends/http/e-cal-backend-http.c
b/calendar/backends/http/e-cal-backend-http.c
index
4943810
..
c2db383
100644
(file)
--- a/
calendar/backends/http/e-cal-backend-http.c
+++ b/
calendar/backends/http/e-cal-backend-http.c
@@
-781,6
+781,8
@@
source_changed_cb (ESource *source,
{
g_return_if_fail (E_IS_CAL_BACKEND_HTTP (cbhttp));
+ g_object_ref (cbhttp);
+
if (cbhttp->priv->uri != NULL) {
gboolean uri_changed;
const gchar *new_uri;
@@
-804,6
+806,8
@@
source_changed_cb (ESource *source,
g_free (old_uri);
}
+
+ g_object_unref (cbhttp);
}
static void