Property: fix memory leak.
authorPauli <paul.dale@oracle.com>
Sun, 24 Nov 2019 08:15:15 +0000 (18:15 +1000)
committerPauli <paul.dale@oracle.com>
Mon, 25 Nov 2019 22:05:51 +0000 (08:05 +1000)
Coverity 1456008.

Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com>
(Merged from https://github.com/openssl/openssl/pull/10509)

crypto/property/property.c

index 33e7469351e21fd07af2105f3e12a3fb18297872..0e31b8fa81e01131432564750120666df7d720c6 100644 (file)
@@ -546,9 +546,9 @@ int ossl_method_store_cache_set(OSSL_METHOD_STORE *store, int nid,
         }
         ossl_method_free(&p->method);
     }
-    OPENSSL_free(p);
 err:
     res = 0;
+    OPENSSL_free(p);
 end:
     ossl_property_unlock(store);
     return res;