Skip to content

Commit

Permalink
Fix obvious memory leak
Browse files Browse the repository at this point in the history
  • Loading branch information
arr2036 committed Apr 11, 2016
1 parent e3c95a7 commit 955b3d4
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/main/tls/validate.c
Expand Up @@ -340,8 +340,9 @@ int tls_validate_cert_cb(int ok, X509_STORE_CTX *x509_ctx)
*/
int tls_validate_client_cert_chain(SSL *ssl)
{
int err;
int verify;
int err;
in verify;
int ret = 1;

STACK_OF(X509) *chain;
X509 *cert;
Expand All @@ -365,12 +366,12 @@ int tls_validate_client_cert_chain(SSL *ssl)
if (verify != 1) {
err = X509_STORE_CTX_get_error(store_ctx);
REDEBUG("Failed re-validating resumed session: %s", X509_verify_cert_error_string(err));
return 0;
ret = 0;
}

X509_free(cert);
X509_STORE_CTX_free(store_ctx);

return 1;
return ret;
}
#endif /* WITH_TLS */

0 comments on commit 955b3d4

Please sign in to comment.