summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/lib/libtls/tls_util.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/lib/libtls/tls_util.c b/src/lib/libtls/tls_util.c
index 3ca3ecad0b..b144fb1eae 100644
--- a/src/lib/libtls/tls_util.c
+++ b/src/lib/libtls/tls_util.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: tls_util.c,v 1.13 2019/04/04 15:10:10 jsing Exp $ */ 1/* $OpenBSD: tls_util.c,v 1.14 2019/04/13 18:47:58 tb Exp $ */
2/* 2/*
3 * Copyright (c) 2014 Joel Sing <jsing@openbsd.org> 3 * Copyright (c) 2014 Joel Sing <jsing@openbsd.org>
4 * Copyright (c) 2014 Ted Unangst <tedu@openbsd.org> 4 * Copyright (c) 2014 Ted Unangst <tedu@openbsd.org>
@@ -102,10 +102,14 @@ tls_host_port(const char *hostport, char **host, char **port)
102 102
103 *p++ = '\0'; 103 *p++ = '\0';
104 104
105 if (asprintf(host, "%s", h) == -1) 105 if (asprintf(host, "%s", h) == -1) {
106 *host = NULL;
106 goto err; 107 goto err;
107 if (asprintf(port, "%s", p) == -1) 108 }
109 if (asprintf(port, "%s", p) == -1) {
110 *port = NULL;
108 goto err; 111 goto err;
112 }
109 113
110 rv = 0; 114 rv = 0;
111 goto done; 115 goto done;