From: Pauli Date: Sun, 24 Feb 2019 11:26:20 +0000 (+1000) Subject: CID 1442836: Resource leaks X-Git-Tag: openssl-3.0.0-alpha1~2483 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=909f2e59832f041cdd0be538f9225f7f3061604a;p=oweals%2Fopenssl.git CID 1442836: Resource leaks Reviewed-by: Bernd Edlinger (Merged from https://github.com/openssl/openssl/pull/8318) --- diff --git a/crypto/property/property.c b/crypto/property/property.c index dea0dfd66d..e4fdc68c4a 100644 --- a/crypto/property/property.c +++ b/crypto/property/property.c @@ -143,11 +143,12 @@ static void alg_cleanup(size_t idx, ALGORITHM *a) OSSL_METHOD_STORE *ossl_method_store_new(void) { - OSSL_METHOD_STORE *res = OPENSSL_zalloc(sizeof(*res)); + OSSL_METHOD_STORE *res; if (!RUN_ONCE(&method_store_init_flag, do_method_store_init)) return 0; + res = OPENSSL_zalloc(sizeof(*res)); if (res != NULL) { if ((res->algs = ossl_sa_ALGORITHM_new()) == NULL) { OPENSSL_free(res);