summaryrefslogtreecommitdiff
path: root/src/lib/libssl/ssl_rsa.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libssl/ssl_rsa.c')
-rw-r--r--src/lib/libssl/ssl_rsa.c21
1 files changed, 7 insertions, 14 deletions
diff --git a/src/lib/libssl/ssl_rsa.c b/src/lib/libssl/ssl_rsa.c
index 23891bf11b..02dfa63a09 100644
--- a/src/lib/libssl/ssl_rsa.c
+++ b/src/lib/libssl/ssl_rsa.c
@@ -118,8 +118,7 @@ SSL_use_certificate_file(SSL *ssl, const char *file, int type)
118end: 118end:
119 if (x != NULL) 119 if (x != NULL)
120 X509_free(x); 120 X509_free(x);
121 if (in != NULL) 121 BIO_free(in);
122 BIO_free(in);
123 return (ret); 122 return (ret);
124} 123}
125 124
@@ -243,8 +242,7 @@ SSL_use_RSAPrivateKey_file(SSL *ssl, const char *file, int type)
243 ret = SSL_use_RSAPrivateKey(ssl, rsa); 242 ret = SSL_use_RSAPrivateKey(ssl, rsa);
244 RSA_free(rsa); 243 RSA_free(rsa);
245end: 244end:
246 if (in != NULL) 245 BIO_free(in);
247 BIO_free(in);
248 return (ret); 246 return (ret);
249} 247}
250 248
@@ -318,8 +316,7 @@ SSL_use_PrivateKey_file(SSL *ssl, const char *file, int type)
318 ret = SSL_use_PrivateKey(ssl, pkey); 316 ret = SSL_use_PrivateKey(ssl, pkey);
319 EVP_PKEY_free(pkey); 317 EVP_PKEY_free(pkey);
320end: 318end:
321 if (in != NULL) 319 BIO_free(in);
322 BIO_free(in);
323 return (ret); 320 return (ret);
324} 321}
325 322
@@ -447,8 +444,7 @@ SSL_CTX_use_certificate_file(SSL_CTX *ctx, const char *file, int type)
447end: 444end:
448 if (x != NULL) 445 if (x != NULL)
449 X509_free(x); 446 X509_free(x);
450 if (in != NULL) 447 BIO_free(in);
451 BIO_free(in);
452 return (ret); 448 return (ret);
453} 449}
454 450
@@ -531,8 +527,7 @@ SSL_CTX_use_RSAPrivateKey_file(SSL_CTX *ctx, const char *file, int type)
531 ret = SSL_CTX_use_RSAPrivateKey(ctx, rsa); 527 ret = SSL_CTX_use_RSAPrivateKey(ctx, rsa);
532 RSA_free(rsa); 528 RSA_free(rsa);
533end: 529end:
534 if (in != NULL) 530 BIO_free(in);
535 BIO_free(in);
536 return (ret); 531 return (ret);
537} 532}
538 533
@@ -603,8 +598,7 @@ SSL_CTX_use_PrivateKey_file(SSL_CTX *ctx, const char *file, int type)
603 ret = SSL_CTX_use_PrivateKey(ctx, pkey); 598 ret = SSL_CTX_use_PrivateKey(ctx, pkey);
604 EVP_PKEY_free(pkey); 599 EVP_PKEY_free(pkey);
605end: 600end:
606 if (in != NULL) 601 BIO_free(in);
607 BIO_free(in);
608 return (ret); 602 return (ret);
609} 603}
610 604
@@ -703,7 +697,6 @@ SSL_CTX_use_certificate_chain_file(SSL_CTX *ctx, const char *file)
703end: 697end:
704 if (x != NULL) 698 if (x != NULL)
705 X509_free(x); 699 X509_free(x);
706 if (in != NULL) 700 BIO_free(in);
707 BIO_free(in);
708 return (ret); 701 return (ret);
709} 702}