summaryrefslogtreecommitdiff
path: root/wocky/wocky-pep-service.c
diff options
context:
space:
mode:
authorWill Thompson <will.thompson@collabora.co.uk>2010-02-23 18:28:36 +0000
committerWill Thompson <will.thompson@collabora.co.uk>2010-02-23 18:28:36 +0000
commit9bec938e524236c43089e3b8aff05def5cfac957 (patch)
tree1447bb693509bcef694d7e01713f8f57f864e691 /wocky/wocky-pep-service.c
parent60d7a62d5f7a13d8786a768c6ee2e7ebd4d8dccf (diff)
PEP: don't leak if pep_service_get_finish() isn't called
Diffstat (limited to 'wocky/wocky-pep-service.c')
-rw-r--r--wocky/wocky-pep-service.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/wocky/wocky-pep-service.c b/wocky/wocky-pep-service.c
index 784bbbc..45c89aa 100644
--- a/wocky/wocky-pep-service.c
+++ b/wocky/wocky-pep-service.c
@@ -284,7 +284,7 @@ send_query_cb (GObject *source,
g_error_free (error);
}
- g_simple_async_result_set_op_res_gpointer (result, reply, NULL);
+ g_simple_async_result_set_op_res_gpointer (result, reply, g_object_unref);
g_simple_async_result_complete (result);
g_object_unref (result);
}
@@ -335,15 +335,15 @@ wocky_pep_service_get_finish (WockyPepService *self,
GAsyncResult *result,
GError **error)
{
- if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (result),
- error))
+ GSimpleAsyncResult *simple = G_SIMPLE_ASYNC_RESULT (result);
+
+ if (g_simple_async_result_propagate_error (simple, error))
return NULL;
g_return_val_if_fail (g_simple_async_result_is_valid (result,
G_OBJECT (self), wocky_pep_service_get_finish), NULL);
- return g_simple_async_result_get_op_res_gpointer (
- G_SIMPLE_ASYNC_RESULT (result));
+ return g_object_ref (g_simple_async_result_get_op_res_gpointer (simple));
}
WockyXmppStanza *