]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Fix memory leak in OpenSSL hashing code.
authorMichael R Sweet <msweet@msweet.org>
Mon, 16 Dec 2024 17:29:10 +0000 (12:29 -0500)
committerMichael R Sweet <msweet@msweet.org>
Mon, 16 Dec 2024 17:29:10 +0000 (12:29 -0500)
cups/hash.c

index 6c4efcb3ced77772f5a52f9ed56fcc9430d3a5c1..ea7378d0c652ec55e7f41f6be0a2b42571d5468a 100644 (file)
@@ -253,6 +253,7 @@ hash_data(const char    *algorithm, // I - Algorithm
     if (b && blen)
       EVP_DigestUpdate(ctx, b, blen);
     EVP_DigestFinal(ctx, hashtemp, &hashlen);
+    EVP_MD_CTX_free(ctx);
 
     if (hashlen > hashsize)
       goto too_small;