summaryrefslogtreecommitdiffstats
path: root/apps/s_socket.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/s_socket.c')
-rw-r--r--apps/s_socket.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/apps/s_socket.c b/apps/s_socket.c
index 050426a0a4..caa5b61053 100644
--- a/apps/s_socket.c
+++ b/apps/s_socket.c
@@ -562,11 +562,7 @@ static int do_accept(int acc_sock, int *sock, char **host)
*host = NULL;
/* return(0); */
} else {
- if ((*host = OPENSSL_malloc(strlen(h1->h_name) + 1)) == NULL) {
- perror("OPENSSL_malloc");
- closesocket(ret);
- return (0);
- }
+ *host = app_malloc(strlen(h1->h_name) + 1, "copy hostname");
BUF_strlcpy(*host, h1->h_name, strlen(h1->h_name) + 1);
h2 = GetHostByName(*host);