diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/libcrypto/bio/b_sock.c | 3 | ||||
| -rw-r--r-- | src/lib/libssl/src/crypto/bio/b_sock.c | 3 | 
2 files changed, 6 insertions, 0 deletions
| diff --git a/src/lib/libcrypto/bio/b_sock.c b/src/lib/libcrypto/bio/b_sock.c index a7791b39e2..e5f42398df 100644 --- a/src/lib/libcrypto/bio/b_sock.c +++ b/src/lib/libcrypto/bio/b_sock.c | |||
| @@ -535,6 +535,7 @@ BIO_accept(int sock, char **addr) | |||
| 535 | if (p) { | 535 | if (p) { | 
| 536 | *p = '\0'; | 536 | *p = '\0'; | 
| 537 | if (!(tmp = realloc(p, nl))) { | 537 | if (!(tmp = realloc(p, nl))) { | 
| 538 | close(ret); | ||
| 538 | ret = -1; | 539 | ret = -1; | 
| 539 | free(p); | 540 | free(p); | 
| 540 | *addr = NULL; | 541 | *addr = NULL; | 
| @@ -546,6 +547,7 @@ BIO_accept(int sock, char **addr) | |||
| 546 | p = malloc(nl); | 547 | p = malloc(nl); | 
| 547 | } | 548 | } | 
| 548 | if (p == NULL) { | 549 | if (p == NULL) { | 
| 550 | close(ret); | ||
| 549 | ret = -1; | 551 | ret = -1; | 
| 550 | BIOerr(BIO_F_BIO_ACCEPT, ERR_R_MALLOC_FAILURE); | 552 | BIOerr(BIO_F_BIO_ACCEPT, ERR_R_MALLOC_FAILURE); | 
| 551 | goto end; | 553 | goto end; | 
| @@ -561,6 +563,7 @@ BIO_accept(int sock, char **addr) | |||
| 561 | port = ntohs(sa.from.sa_in.sin_port); | 563 | port = ntohs(sa.from.sa_in.sin_port); | 
| 562 | if (*addr == NULL) { | 564 | if (*addr == NULL) { | 
| 563 | if ((p = malloc(24)) == NULL) { | 565 | if ((p = malloc(24)) == NULL) { | 
| 566 | close(ret); | ||
| 564 | ret = -1; | 567 | ret = -1; | 
| 565 | BIOerr(BIO_F_BIO_ACCEPT, ERR_R_MALLOC_FAILURE); | 568 | BIOerr(BIO_F_BIO_ACCEPT, ERR_R_MALLOC_FAILURE); | 
| 566 | goto end; | 569 | goto end; | 
| diff --git a/src/lib/libssl/src/crypto/bio/b_sock.c b/src/lib/libssl/src/crypto/bio/b_sock.c index a7791b39e2..e5f42398df 100644 --- a/src/lib/libssl/src/crypto/bio/b_sock.c +++ b/src/lib/libssl/src/crypto/bio/b_sock.c | |||
| @@ -535,6 +535,7 @@ BIO_accept(int sock, char **addr) | |||
| 535 | if (p) { | 535 | if (p) { | 
| 536 | *p = '\0'; | 536 | *p = '\0'; | 
| 537 | if (!(tmp = realloc(p, nl))) { | 537 | if (!(tmp = realloc(p, nl))) { | 
| 538 | close(ret); | ||
| 538 | ret = -1; | 539 | ret = -1; | 
| 539 | free(p); | 540 | free(p); | 
| 540 | *addr = NULL; | 541 | *addr = NULL; | 
| @@ -546,6 +547,7 @@ BIO_accept(int sock, char **addr) | |||
| 546 | p = malloc(nl); | 547 | p = malloc(nl); | 
| 547 | } | 548 | } | 
| 548 | if (p == NULL) { | 549 | if (p == NULL) { | 
| 550 | close(ret); | ||
| 549 | ret = -1; | 551 | ret = -1; | 
| 550 | BIOerr(BIO_F_BIO_ACCEPT, ERR_R_MALLOC_FAILURE); | 552 | BIOerr(BIO_F_BIO_ACCEPT, ERR_R_MALLOC_FAILURE); | 
| 551 | goto end; | 553 | goto end; | 
| @@ -561,6 +563,7 @@ BIO_accept(int sock, char **addr) | |||
| 561 | port = ntohs(sa.from.sa_in.sin_port); | 563 | port = ntohs(sa.from.sa_in.sin_port); | 
| 562 | if (*addr == NULL) { | 564 | if (*addr == NULL) { | 
| 563 | if ((p = malloc(24)) == NULL) { | 565 | if ((p = malloc(24)) == NULL) { | 
| 566 | close(ret); | ||
| 564 | ret = -1; | 567 | ret = -1; | 
| 565 | BIOerr(BIO_F_BIO_ACCEPT, ERR_R_MALLOC_FAILURE); | 568 | BIOerr(BIO_F_BIO_ACCEPT, ERR_R_MALLOC_FAILURE); | 
| 566 | goto end; | 569 | goto end; | 
