Skip to content
Permalink
Browse files
Don't ignore (!) reference count in X509_STORE_free.
  • Loading branch information
snhenson committed Jul 19, 2012
1 parent 7fbcc2f commit 5b4b9ce976fce09a7a92e2f25b91a1635cb840fe
Showing with 13 additions and 0 deletions.
  1. +13 −0 crypto/x509/x509_lu.c
@@ -238,6 +238,19 @@ void X509_STORE_free(X509_STORE *vfy)
if (vfy == NULL)
return;

i=CRYPTO_add(&vfy->references,-1,CRYPTO_LOCK_X509_STORE);
#ifdef REF_PRINT
REF_PRINT("X509_STORE",vfy);
#endif
if (i > 0) return;
#ifdef REF_CHECK
if (i < 0)
{
fprintf(stderr,"X509_STORE_free, bad reference count\n");
abort(); /* ok */
}
#endif

sk=vfy->get_cert_methods;
for (i=0; i<sk_X509_LOOKUP_num(sk); i++)
{

1 comment on commit 5b4b9ce

@Destya

This comment has been minimized.

Copy link

@Destya Destya commented on 5b4b9ce Sep 4, 2018

Comment pn 5b4b9ce

Please sign in to comment.