Add support for reference counting using C11 atomics
[openssl.git] / ssl / ssl_cert.c
index 9d359572a9c84af33e667c49d12aaaf3704d49b7..f26e8760149b503c0290de36e78a65728be4ebfb 100644 (file)
@@ -235,7 +235,7 @@ void ssl_cert_free(CERT *c)
     if (c == NULL)
         return;
 
-    CRYPTO_atomic_add(&c->references, -1, &i, c->lock);
+    CRYPTO_DOWN_REF(&c->references, &i, c->lock);
     REF_PRINT_COUNT("CERT", c);
     if (i > 0)
         return;