summaryrefslogtreecommitdiff
path: root/canohost.c
diff options
context:
space:
mode:
Diffstat (limited to 'canohost.c')
-rw-r--r--canohost.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/canohost.c b/canohost.c
index dabd8a31a..69e8e6f6d 100644
--- a/canohost.c
+++ b/canohost.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: canohost.c,v 1.66 2010/01/13 01:20:20 dtucker Exp $ */ 1/* $OpenBSD: canohost.c,v 1.67 2013/05/17 00:13:13 djm Exp $ */
2/* 2/*
3 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -41,7 +41,7 @@ static int cached_port = -1;
41 41
42/* 42/*
43 * Return the canonical name of the host at the other end of the socket. The 43 * Return the canonical name of the host at the other end of the socket. The
44 * caller should free the returned string with xfree. 44 * caller should free the returned string.
45 */ 45 */
46 46
47static char * 47static char *
@@ -323,10 +323,8 @@ get_local_name(int fd)
323void 323void
324clear_cached_addr(void) 324clear_cached_addr(void)
325{ 325{
326 if (canonical_host_ip != NULL) { 326 free(canonical_host_ip);
327 xfree(canonical_host_ip); 327 canonical_host_ip = NULL;
328 canonical_host_ip = NULL;
329 }
330 cached_port = -1; 328 cached_port = -1;
331} 329}
332 330