aboutsummaryrefslogtreecommitdiffstats
path: root/camel/providers
diff options
context:
space:
mode:
authorNot Zed <NotZed@Ximian.com>2003-04-24 09:51:20 +0800
committerMichael Zucci <zucchi@src.gnome.org>2003-04-24 09:51:20 +0800
commit36eaccbb3aef02015009fc3900443f076e74efd8 (patch)
tree185788aa7e1c747324b4d1dadc78cf2eba22115c /camel/providers
parent7b52d68f56133b6bdf34b0a8923cb57f8f410ef7 (diff)
downloadgsoc2013-evolution-36eaccbb3aef02015009fc3900443f076e74efd8.tar
gsoc2013-evolution-36eaccbb3aef02015009fc3900443f076e74efd8.tar.gz
gsoc2013-evolution-36eaccbb3aef02015009fc3900443f076e74efd8.tar.bz2
gsoc2013-evolution-36eaccbb3aef02015009fc3900443f076e74efd8.tar.lz
gsoc2013-evolution-36eaccbb3aef02015009fc3900443f076e74efd8.tar.xz
gsoc2013-evolution-36eaccbb3aef02015009fc3900443f076e74efd8.tar.zst
gsoc2013-evolution-36eaccbb3aef02015009fc3900443f076e74efd8.zip
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. svn path=/trunk/; revision=20949
Diffstat (limited to 'camel/providers')
-rw-r--r--camel/providers/smtp/camel-smtp-transport.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/camel/providers/smtp/camel-smtp-transport.c b/camel/providers/smtp/camel-smtp-transport.c
index 5cdf33a5ce..83bb39c577 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);