projects
/
openssl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix an s_client memory leak
[openssl.git]
/
test
/
crltest.c
diff --git
a/test/crltest.c
b/test/crltest.c
index f5af4b1e4f983bca13bcde0904dfe2e6d3cb345f..738ca23ce571e667654091b8f238f6dfd2d52c6f 100644
(file)
--- a/
test/crltest.c
+++ b/
test/crltest.c
@@
-7,7
+7,7
@@
* https://www.openssl.org/source/license.html
*/
* https://www.openssl.org/source/license.html
*/
-#include
<internal/nelem.h>
+#include
"internal/nelem.h"
#include <string.h>
#include <openssl/bio.h>
#include <openssl/crypto.h>
#include <string.h>
#include <openssl/bio.h>
#include <openssl/crypto.h>
@@
-267,6
+267,7
@@
static int verify(X509 *leaf, X509 *root, STACK_OF(X509_CRL) *crls,
if (flags)
X509_VERIFY_PARAM_set_flags(param, flags);
X509_STORE_CTX_set0_param(ctx, param);
if (flags)
X509_VERIFY_PARAM_set_flags(param, flags);
X509_STORE_CTX_set0_param(ctx, param);
+ param = NULL;
ERR_clear_error();
status = X509_verify_cert(ctx) == 1 ? X509_V_OK
ERR_clear_error();
status = X509_verify_cert(ctx) == 1 ? X509_V_OK
@@
-274,6
+275,7
@@
static int verify(X509 *leaf, X509 *root, STACK_OF(X509_CRL) *crls,
err:
sk_X509_pop_free(roots, X509_free);
sk_X509_CRL_pop_free(crls, X509_CRL_free);
err:
sk_X509_pop_free(roots, X509_free);
sk_X509_CRL_pop_free(crls, X509_CRL_free);
+ X509_VERIFY_PARAM_free(param);
X509_STORE_CTX_free(ctx);
X509_STORE_free(store);
return status;
X509_STORE_CTX_free(ctx);
X509_STORE_free(store);
return status;