=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/ssh/auth.c,v retrieving revision 1.143 retrieving revision 1.144 diff -u -r1.143 -r1.144 --- src/usr.bin/ssh/auth.c 2019/11/25 00:54:23 1.143 +++ src/usr.bin/ssh/auth.c 2019/12/16 13:58:53 1.144 @@ -1,4 +1,4 @@ -/* $OpenBSD: auth.c,v 1.143 2019/11/25 00:54:23 djm Exp $ */ +/* $OpenBSD: auth.c,v 1.144 2019/12/16 13:58:53 tobhe Exp $ */ /* * Copyright (c) 2000 Markus Friedl. All rights reserved. * @@ -631,7 +631,7 @@ if (getpeername(ssh_packet_get_connection_in(ssh), (struct sockaddr *)&from, &fromlen) == -1) { debug("getpeername failed: %.100s", strerror(errno)); - return strdup(ntop); + return xstrdup(ntop); } debug3("Trying to reverse map address %.100s.", ntop); @@ -639,7 +639,7 @@ if (getnameinfo((struct sockaddr *)&from, fromlen, name, sizeof(name), NULL, 0, NI_NAMEREQD) != 0) { /* Host name not found. Use ip address. */ - return strdup(ntop); + return xstrdup(ntop); } /* @@ -654,7 +654,7 @@ logit("Nasty PTR record \"%s\" is set up for %s, ignoring", name, ntop); freeaddrinfo(ai); - return strdup(ntop); + return xstrdup(ntop); } /* Names are stored in lowercase. */ @@ -675,7 +675,7 @@ if (getaddrinfo(name, NULL, &hints, &aitop) != 0) { logit("reverse mapping checking getaddrinfo for %.700s " "[%s] failed.", name, ntop); - return strdup(ntop); + return xstrdup(ntop); } /* Look for the address from the list of addresses. */ for (ai = aitop; ai; ai = ai->ai_next) { @@ -690,9 +690,9 @@ /* Address not found for the host name. */ logit("Address %.100s maps to %.600s, but this does not " "map back to the address.", ntop, name); - return strdup(ntop); + return xstrdup(ntop); } - return strdup(name); + return xstrdup(name); } /*