summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorClemens Lang via Gcrypt-devel <gcrypt-devel@lists.gnupg.org>2022-02-11 16:55:02 +0100
committerNIIBE Yutaka <gniibe@fsij.org>2022-02-14 15:11:41 +0900
commit6994d874af865cc6ba95a8a6eb5a8fe048e88e07 (patch)
tree5aea077b166de24827269d1f07d17594435edf56 /src
parent7fc5d33e74164519edcd8127a35cc21228d2727f (diff)
downloadlibgcrypt-6994d874af865cc6ba95a8a6eb5a8fe048e88e07.tar.gz
hmac: Fix memory leak
* src/hmac.c: Release HMAC256 context -- LeakSanitizer marks the allocation of this context as leaked. Since the hmac binary is used during the build with --enable-hmac-binary-check, this fails the build with AddressSanitizer/LeakSanitizer. Signed-off-by: Clemens Lang <cllang@redhat.com>
Diffstat (limited to 'src')
-rw-r--r--src/hmac256.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/hmac256.c b/src/hmac256.c
index bd089b79..899e6d15 100644
--- a/src/hmac256.c
+++ b/src/hmac256.c
@@ -780,6 +780,7 @@ main (int argc, char **argv)
pgm, strerror (errno));
exit (1);
}
+ _gcry_hmac256_release (hd);
if (use_stdin)
break;
}