diff options
Diffstat (limited to 'camel/providers')
-rw-r--r-- | camel/providers/pop3/camel-pop3-store.c | 3 | ||||
-rw-r--r-- | camel/providers/smtp/camel-smtp-transport.c | 1 |
2 files changed, 4 insertions, 0 deletions
diff --git a/camel/providers/pop3/camel-pop3-store.c b/camel/providers/pop3/camel-pop3-store.c index 17b2fdf8ee..4ebb92dd2b 100644 --- a/camel/providers/pop3/camel-pop3-store.c +++ b/camel/providers/pop3/camel-pop3-store.c @@ -169,9 +169,12 @@ connect_to_server (CamelService *service, CamelException *ex) /* Need to copy hostname, because krb_realmofhost will * call gethostbyname as well, and gethostbyname uses * static storage. + * This isn't really necessary since gethost() returns a copy anyway, + * but for simplicity leave the old code here - NZ */ h = camel_service_gethost (service, ex); hostname = g_strdup (h->h_name); + camel_free_host(h); fd = CAMEL_STREAM_FS (CAMEL_REMOTE_STORE (service)->ostream)->fd; diff --git a/camel/providers/smtp/camel-smtp-transport.c b/camel/providers/smtp/camel-smtp-transport.c index a6572d4bdc..f2c344ebba 100644 --- a/camel/providers/smtp/camel-smtp-transport.c +++ b/camel/providers/smtp/camel-smtp-transport.c @@ -255,6 +255,7 @@ smtp_connect (CamelService *service, CamelException *ex) #endif /* HAVE_NSS */ ret = camel_tcp_stream_connect (CAMEL_TCP_STREAM (tcp_stream), h, port); + camel_free_host(h); if (ret == -1) { camel_exception_setv (ex, CAMEL_EXCEPTION_SERVICE_UNAVAILABLE, _("Could not connect to %s (port %d): %s"), |