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

crypto/ct/ct_policy.c

index 76e08b8..e067fd8 100644 (file)
@@ -40,6 +40,7 @@ CT_POLICY_EVAL_CTX *CT_POLICY_EVAL_CTX_new_with_libctx(OPENSSL_CTX *libctx,
         ctx->propq = OPENSSL_strdup(propq);
         if (ctx->propq == NULL) {
             CTerr(0, ERR_R_MALLOC_FAILURE);
+            OPENSSL_free(ctx);
             return NULL;
         }
     }