aboutsummaryrefslogtreecommitdiffstats
path: root/camel/providers/pop3
diff options
context:
space:
mode:
Diffstat (limited to 'camel/providers/pop3')
-rw-r--r--camel/providers/pop3/camel-pop3-folder.c1
-rw-r--r--camel/providers/pop3/camel-pop3-store.c17
2 files changed, 8 insertions, 10 deletions
diff --git a/camel/providers/pop3/camel-pop3-folder.c b/camel/providers/pop3/camel-pop3-folder.c
index f47851a6a4..bb2c7de6e1 100644
--- a/camel/providers/pop3/camel-pop3-folder.c
+++ b/camel/providers/pop3/camel-pop3-folder.c
@@ -209,6 +209,7 @@ get_message_by_number (CamelFolder *folder, gint number, CamelException *ex)
msg = camel_mime_message_new ();
camel_data_wrapper_construct_from_stream (CAMEL_DATA_WRAPPER (msg),
msgstream);
+ gtk_object_unref (GTK_OBJECT (msgstream));
return msg;
}
diff --git a/camel/providers/pop3/camel-pop3-store.c b/camel/providers/pop3/camel-pop3-store.c
index ff4ca265a1..9ae87ad420 100644
--- a/camel/providers/pop3/camel-pop3-store.c
+++ b/camel/providers/pop3/camel-pop3-store.c
@@ -382,8 +382,8 @@ pop3_connect (CamelService *service, CamelException *ex)
"Could not read greeting from POP "
"server.");
return FALSE;
- camel_stream_close (store->ostream);
- camel_stream_close (store->istream);
+ gtk_object_unref (GTK_OBJECT (store->ostream));
+ gtk_object_unref (GTK_OBJECT (store->istream));
}
apoptime = strchr (buf, '<');
apopend = apoptime ? strchr (apoptime, '>') : NULL;
@@ -418,8 +418,8 @@ pop3_connect (CamelService *service, CamelException *ex)
"server. Error sending username:"
" %s", msg ? msg : "(Unknown)");
g_free (msg);
- camel_stream_close (store->ostream);
- camel_stream_close (store->istream);
+ gtk_object_unref (GTK_OBJECT (store->ostream));
+ gtk_object_unref (GTK_OBJECT (store->istream));
return FALSE;
}
@@ -433,8 +433,8 @@ pop3_connect (CamelService *service, CamelException *ex)
"server. Error sending password:"
" %s", msg ? msg : "(Unknown)");
g_free (msg);
- camel_stream_close (store->ostream);
- camel_stream_close (store->istream);
+ gtk_object_unref (GTK_OBJECT (store->ostream));
+ gtk_object_unref (GTK_OBJECT (store->istream));
return FALSE;
}
@@ -453,11 +453,8 @@ pop3_disconnect (CamelService *service, CamelException *ex)
if (!service_class->disconnect (service, ex))
return FALSE;
- /* Closing the buffered write stream will close the
- * unbuffered read stream wrapped inside it as well.
- */
- camel_stream_close (store->ostream);
gtk_object_unref (GTK_OBJECT (store->ostream));
+ gtk_object_unref (GTK_OBJECT (store->istream));
store->ostream = NULL;
store->istream = NULL;
return TRUE;