aboutsummaryrefslogtreecommitdiff
path: root/crypto/bio/b_sock.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/bio/b_sock.c')
-rw-r--r--crypto/bio/b_sock.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/crypto/bio/b_sock.c b/crypto/bio/b_sock.c
index ca485d9..a4fded5 100644
--- a/crypto/bio/b_sock.c
+++ b/crypto/bio/b_sock.c
@@ -673,12 +673,9 @@ int BIO_accept(int sock, char **addr)
break;
nl = strlen(h) + strlen(s) + 2;
p = *addr;
- if (p) {
+ if (p)
*p = '\0';
- p = OPENSSL_realloc(p, nl);
- } else {
- p = OPENSSL_malloc(nl);
- }
+ p = OPENSSL_realloc(p, nl);
if (p == NULL) {
BIOerr(BIO_F_BIO_ACCEPT, ERR_R_MALLOC_FAILURE);
goto end;