[glib-networking] Unref GCancellables if they were reffed by the object.
- From: Mike Ruprecht <mruprecht src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib-networking] Unref GCancellables if they were reffed by the object.
- Date: Sat, 2 Apr 2011 00:08:44 +0000 (UTC)
commit beabf4ae146344bfcec20fd783aa4f924ff7bc6b
Author: Mike Ruprecht <mike ruprecht collabora co uk>
Date: Fri Apr 1 16:40:18 2011 -0500
Unref GCancellables if they were reffed by the object.
tls/gnutls/gtlsinputstream-gnutls.c | 3 +++
tls/gnutls/gtlsoutputstream-gnutls.c | 3 +++
2 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/tls/gnutls/gtlsinputstream-gnutls.c b/tls/gnutls/gtlsinputstream-gnutls.c
index 0874576..dd22be5 100644
--- a/tls/gnutls/gtlsinputstream-gnutls.c
+++ b/tls/gnutls/gtlsinputstream-gnutls.c
@@ -93,6 +93,9 @@ g_tls_input_stream_gnutls_read_ready (GPollableInputStream *stream,
}
else
g_simple_async_result_set_op_res_gssize (simple, nread);
+
+ if (tls_stream->priv->cancellable)
+ g_object_unref (tls_stream->priv->cancellable);
g_simple_async_result_complete (simple);
g_object_unref (simple);
diff --git a/tls/gnutls/gtlsoutputstream-gnutls.c b/tls/gnutls/gtlsoutputstream-gnutls.c
index e69e445..462d74e 100644
--- a/tls/gnutls/gtlsoutputstream-gnutls.c
+++ b/tls/gnutls/gtlsoutputstream-gnutls.c
@@ -93,6 +93,9 @@ g_tls_output_stream_gnutls_write_ready (GIOStreamAdapter *adapter,
}
else
g_simple_async_result_set_op_res_gssize (simple, nwrote);
+
+ if (tls_stream->priv->cancellable)
+ g_object_unref (tls_stream->priv->cancellable);
g_simple_async_result_complete (simple);
g_object_unref (simple);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]