summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWill Thompson <will.thompson@collabora.co.uk>2010-08-24 22:42:08 +0100
committerWill Thompson <will.thompson@collabora.co.uk>2010-08-25 14:24:40 +0100
commitd1445f724ddb0ce70ce3a73c9a7fe307f3cfc8e2 (patch)
tree011def7f762523c89eb6b9c0bd9c4ffdb6e427a4
parentcfe1bd86d1143631218e97396122c7f4b4d8cf85 (diff)
Pubsub: unleak calls to g_simple_async_result_get_source_object()
I tracked down a bug in Gabble to not unreffing the result of g_simple_async_result_get_source_object() and thought I'd check Wocky. I'm proud to report that I am responsible for all instances of this error in Wocky. I'm even prouder to report that I found it once before, added a comment explaining it, and then promptly forgot about it IN THE SAME FILE. Dunce hat for me. Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
-rw-r--r--wocky/wocky-pubsub-node.c3
-rw-r--r--wocky/wocky-pubsub-service.c2
2 files changed, 4 insertions, 1 deletions
diff --git a/wocky/wocky-pubsub-node.c b/wocky/wocky-pubsub-node.c
index 01ff596..662bfa0 100644
--- a/wocky/wocky-pubsub-node.c
+++ b/wocky/wocky-pubsub-node.c
@@ -446,6 +446,7 @@ subscribe_cb (GObject *source,
g_simple_async_result_complete (simple);
g_object_unref (simple);
+ g_object_unref (self);
}
/**
@@ -669,6 +670,7 @@ list_subscribers_cb (GObject *source,
g_simple_async_result_complete (simple);
g_object_unref (simple);
+ g_object_unref (self);
}
/**
@@ -816,6 +818,7 @@ list_affiliates_cb (GObject *source,
g_simple_async_result_complete (simple);
g_object_unref (simple);
+ g_object_unref (self);
}
/**
diff --git a/wocky/wocky-pubsub-service.c b/wocky/wocky-pubsub-service.c
index 8a35475..fec3ffb 100644
--- a/wocky/wocky-pubsub-service.c
+++ b/wocky/wocky-pubsub-service.c
@@ -699,6 +699,7 @@ receive_subscriptions_cb (GObject *source,
g_simple_async_result_complete (simple);
g_object_unref (simple);
+ g_object_unref (self);
}
WockyStanza *
@@ -860,7 +861,6 @@ create_node_iq_cb (GObject *source,
g_simple_async_result_complete (result);
g_object_unref (result);
- /* g_async_result_get_source_object refs the object */
g_object_unref (self);
}