In particular, this can happen if you accidentally install two content
decoders on the same session. Pointed out a long time ago in email by
Christophe Gillette.
const char *header;
GSList *encodings, *e;
GType coding_type;
const char *header;
GSList *encodings, *e;
GType coding_type;
header = soup_message_headers_get_list (msg->response_headers,
"Content-Encoding");
header = soup_message_headers_get_list (msg->response_headers,
"Content-Encoding");
- msgpriv->decoders = NULL;
+ /* msgpriv->decoders should be empty at this point anyway, but
+ * clean it up if it's not.
+ */
+ while (msgpriv->decoders) {
+ g_object_unref (msgpriv->decoders->data);
+ msgpriv->decoders = g_slist_delete_link (msgpriv->decoders, msgpriv->decoders);
+ }
+
for (e = encodings; e; e = e->next) {
coding_type = (GType) GPOINTER_TO_SIZE (g_hash_table_lookup (decoder->priv->codings, e->data));
coding = g_object_new (coding_type,
for (e = encodings; e; e = e->next) {
coding_type = (GType) GPOINTER_TO_SIZE (g_hash_table_lookup (decoder->priv->codings, e->data));
coding = g_object_new (coding_type,