aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--camel/ChangeLog4
-rw-r--r--camel/providers/pop3/camel-pop3-store.c4
2 files changed, 6 insertions, 2 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog
index 76dcea3134..991e4d3ca1 100644
--- a/camel/ChangeLog
+++ b/camel/ChangeLog
@@ -1,5 +1,9 @@
2004-11-15 Jeffrey Stedfast <fejj@novell.com>
+ * providers/pop3/camel-pop3-store.c (connect_to_server): Moved the
+ last tcp_stream unref to afetr the last fail-check so that we
+ won't ever get a double-unref on something we only own one ref on.
+
* providers/imap4/camel-imap4-stream.c (camel_imap4_stream_line):
Fix bug #69408 by filling our input buffer if inptr == inend.
diff --git a/camel/providers/pop3/camel-pop3-store.c b/camel/providers/pop3/camel-pop3-store.c
index 3fcfef3fb7..0edff243e8 100644
--- a/camel/providers/pop3/camel-pop3-store.c
+++ b/camel/providers/pop3/camel-pop3-store.c
@@ -236,8 +236,6 @@ connect_to_server (CamelService *service, struct addrinfo *ai, int ssl_mode, Cam
/* Okay, now toggle SSL/TLS mode */
ret = camel_tcp_stream_ssl_enable_ssl (CAMEL_TCP_STREAM_SSL (tcp_stream));
- camel_object_unref (CAMEL_OBJECT (tcp_stream));
-
if (ret == -1) {
camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
_("Failed to connect to POP server %s in secure mode: %s"),
@@ -245,6 +243,8 @@ connect_to_server (CamelService *service, struct addrinfo *ai, int ssl_mode, Cam
goto stls_exception;
}
+ camel_object_unref (tcp_stream);
+
/* rfc2595, section 4 states that after a successful STLS
command, the client MUST discard prior CAPA responses */
camel_pop3_engine_reget_capabilities (store->engine);