add OSSL_STACK_OF_X509_free() for commonly used pattern
[openssl.git] / crypto / cmp / cmp_client.c
index c7674ce088695c62957da0e3ca8937032822b71b..4a7a87ff74278855816679158d69e847b34a28d7 100644 (file)
@@ -514,7 +514,7 @@ int OSSL_CMP_certConf_cb(OSSL_CMP_CTX *ctx, X509 *cert, int fail_info,
                        "success building approximate chain for newly enrolled cert");
     }
     (void)ossl_cmp_ctx_set1_newChain(ctx, chain);
-    sk_X509_pop_free(chain, X509_free);
+    OSSL_STACK_OF_X509_free(chain);
 
     return fail_info;
 }