[libsoup] Set the message priv->decoders to NULL after free.



commit 394f7afc5250815477ea479e29bd55d0953ced41
Author: Alban Browaeys <prahal yahoo com>
Date:   Mon Jul 16 23:21:18 2012 +0200

    Set the message priv->decoders to NULL after free.
    
    Set the message priv->decoders to NULL after free
    to fix
    
    (epiphany:14909): GLib-GObject-CRITICAL **: g_object_unref:
    assertion `G_IS_OBJECT (object)' failed
    
     in epiphany from soup_message_cleanup_response.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=680055

 libsoup/soup-content-decoder.c |    1 +
 libsoup/soup-message.c         |    1 +
 2 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/libsoup/soup-content-decoder.c b/libsoup/soup-content-decoder.c
index 0651338..85dcef4 100644
--- a/libsoup/soup-content-decoder.c
+++ b/libsoup/soup-content-decoder.c
@@ -149,6 +149,7 @@ soup_content_decoder_got_headers_cb (SoupMessage *msg, SoupContentDecoder *decod
 	 * clean it up if it's not.
 	 */
 	g_slist_free_full (msgpriv->decoders, g_object_unref);
+	msgpriv->decoders = NULL;
 
 	for (e = encodings; e; e = e->next) {
 		converter_creator = g_hash_table_lookup (decoder->priv->decoders, e->data);
diff --git a/libsoup/soup-message.c b/libsoup/soup-message.c
index 8a45395..3e1112e 100644
--- a/libsoup/soup-message.c
+++ b/libsoup/soup-message.c
@@ -1414,6 +1414,7 @@ soup_message_cleanup_response (SoupMessage *req)
 	}
 
 	g_slist_free_full (priv->decoders, g_object_unref);
+	priv->decoders = NULL;
 	priv->msg_flags &= ~SOUP_MESSAGE_CONTENT_DECODED;
 
 	req->status_code = SOUP_STATUS_NONE;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]