]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
Fix CID #1465216 Resource leak in property_fetch
authorShane Lontis <shane.lontis@oracle.com>
Mon, 6 Jul 2020 04:08:58 +0000 (14:08 +1000)
committerDmitry Belyavskiy <beldmit@gmail.com>
Wed, 8 Jul 2020 08:19:08 +0000 (11:19 +0300)
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/12379)

crypto/property/property.c

index a3b52ee44d54fac72e690de2f5946d646d2c0b51..645e361b0a3c66a390f615b3d4ee25baf6084505 100644 (file)
@@ -358,9 +358,9 @@ int ossl_method_store_fetch(OSSL_METHOD_STORE *store, int nid,
             pq = *plp;
         } else {
             p2 = ossl_property_merge(pq, *plp);
+            ossl_property_free(pq);
             if (p2 == NULL)
                 goto fin;
-            ossl_property_free(pq);
             pq = p2;
         }
     }