summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNot Zed <NotZed@Ximian.com>2003-04-24 01:51:20 +0000
committerMichael Zucci <zucchi@src.gnome.org>2003-04-24 01:51:20 +0000
commit192c77bdafd5b4a1bc20aba6566f2e71d3b8241e (patch)
tree2c11c5f8eabe09ec71737186c808efe048858ad3
parent5d1f5b087ba1f9ca690b478b073c6605e1d62eaf (diff)
downloadevolution-data-server-192c77bdafd5b4a1bc20aba6566f2e71d3b8241e.tar.gz
only free the host if it was set. removes a run-time warning.
2003-04-23 Not Zed <NotZed@Ximian.com> * providers/smtp/camel-smtp-transport.c (smtp_helo): only free the host if it was set. removes a run-time warning.
-rw-r--r--camel/ChangeLog3
-rw-r--r--camel/providers/smtp/camel-smtp-transport.c10
2 files changed, 8 insertions, 5 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog
index 7bf58a376..a8a4961d0 100644
--- a/camel/ChangeLog
+++ b/camel/ChangeLog
@@ -6,6 +6,9 @@
2003-04-23 Not Zed <NotZed@Ximian.com>
+ * providers/smtp/camel-smtp-transport.c (smtp_helo): only free the
+ host if it was set. removes a run-time warning.
+
* camel-session.c (get_service): oops, the service owns the url
after we construct it.
diff --git a/camel/providers/smtp/camel-smtp-transport.c b/camel/providers/smtp/camel-smtp-transport.c
index 5cdf33a5c..83bb39c57 100644
--- a/camel/providers/smtp/camel-smtp-transport.c
+++ b/camel/providers/smtp/camel-smtp-transport.c
@@ -891,8 +891,10 @@ smtp_helo (CamelSmtpTransport *transport, CamelException *ex)
camel_exception_clear (&err);
- if (host && host->h_name && *host->h_name) {
- name = g_strdup (host->h_name);
+ if (host) {
+ if (host->h_name && *host->h_name)
+ name = g_strdup (host->h_name);
+ camel_free_host (host);
} else {
#ifdef ENABLE_IPv6
char ip[MAXHOSTNAMELEN + 1];
@@ -909,9 +911,7 @@ smtp_helo (CamelSmtpTransport *transport, CamelException *ex)
transport->localaddr->address[3]);
#endif
}
-
- camel_free_host (host);
-
+
/* hiya server! how are you today? */
if (transport->flags & CAMEL_SMTP_TRANSPORT_IS_ESMTP)
cmdbuf = g_strdup_printf ("EHLO %s\r\n", name);