diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2012-07-19 12:44:09 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2012-07-19 12:44:09 +0000 |
commit | bff9ce4db38b297c72a6d84617d71ae2934450f7 (patch) | |
tree | 108190bd5e8105664c1f7580b9020e415ef6b911 /crypto/x509/x509_lu.c | |
parent | b7bfe69b665e0215daf7715adddd7fc7a4b2b63e (diff) | |
download | openssl-bff9ce4db38b297c72a6d84617d71ae2934450f7.tar.gz |
Don't ignore (\!) reference count in X509_STORE_free
Diffstat (limited to 'crypto/x509/x509_lu.c')
-rw-r--r-- | crypto/x509/x509_lu.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/crypto/x509/x509_lu.c b/crypto/x509/x509_lu.c index 38525a8cdd..72121f6bec 100644 --- a/crypto/x509/x509_lu.c +++ b/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++) { |