coverity 1462560 Resource leak
authorPauli <paul.dale@oracle.com>
Sun, 26 Apr 2020 22:54:28 +0000 (08:54 +1000)
committerPauli <paul.dale@oracle.com>
Thu, 30 Apr 2020 10:21:32 +0000 (20:21 +1000)
Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org>
(Merged from https://github.com/openssl/openssl/pull/11651)

crypto/x509/x509_vfy.c

index e5fbd2a..fb04691 100644 (file)
@@ -3258,6 +3258,7 @@ static int build_chain(X509_STORE_CTX *ctx)
             if (ss < 0) {
                 X509err(X509_F_BUILD_CHAIN, ERR_R_INTERNAL_ERROR);
                 ctx->error = X509_V_ERR_UNSPECIFIED;
+                sk_X509_free(sktmp);
                 return 0;
             }