X-Git-Url: https://git.hcoop.net/bpt/emacs.git/blobdiff_plain/41f21300076e539c081ab35db531d0b86515112f..1fa68f218e08d2e1e8ccd54d0061d3012461e46e:/lib-src/pop.c diff --git a/lib-src/pop.c b/lib-src/pop.c index 5657df5a5d..9292998e28 100644 --- a/lib-src/pop.c +++ b/lib-src/pop.c @@ -1005,6 +1005,7 @@ socket_connection (host, flags) CREDENTIALS cred; Key_schedule schedule; int rem; + char *realhost; #endif /* KRB5 */ #endif /* KERBEROS */ @@ -1175,13 +1176,15 @@ socket_connection (host, flags) } #else /* ! KRB5 */ ticket = (KTEXT) malloc (sizeof (KTEXT_ST)); - rem = krb_sendauth (0L, sock, ticket, "pop", hostent->h_name, - (char *) krb_realmofhost (hostent->h_name), + realhost = strdup (hostent->h_name); + rem = krb_sendauth (0L, sock, ticket, "pop", realhost, + (char *) krb_realmofhost (realhost), (unsigned long) 0, &msg_data, &cred, schedule, (struct sockaddr_in *) 0, (struct sockaddr_in *) 0, "KPOPV0.1"); free ((char *) ticket); + free (realhost); if (rem != KSUCCESS) { strcpy (pop_error, KRB_ERROR);