Skip to content

Commit

Permalink
Fix memory leak in OpenSSL hashing code.
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelrsweet committed Dec 16, 2024
1 parent 24fc56c commit 0a28913
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions cups/hash.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 0a28913

Please sign in to comment.