summaryrefslogtreecommitdiff
path: root/crypto
diff options
context:
space:
mode:
authorSimon Josefsson <simon@josefsson.org>2004-08-16 20:21:02 +0000
committerSimon Josefsson <simon@josefsson.org>2004-08-16 20:21:02 +0000
commit2a6b8d4f88e527cdae6fc2ed178589b623ee4659 (patch)
treea2e49b490db8f99d18b063d52019f0839ceb8c38 /crypto
parent8c54a466949d353539eb367243dc37a84f3ff4e6 (diff)
downloadgnutls-2a6b8d4f88e527cdae6fc2ed178589b623ee4659.tar.gz
Fix.
Diffstat (limited to 'crypto')
-rw-r--r--crypto/gc-nettle.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/crypto/gc-nettle.c b/crypto/gc-nettle.c
index dc38c5f7ac..18669c1c6d 100644
--- a/crypto/gc-nettle.c
+++ b/crypto/gc-nettle.c
@@ -425,6 +425,7 @@ gc_hash_clone (gc_hash handle, gc_hash * outhandle)
}
memcpy (newhinf->context, oldhinf->context, newhinf->info->context_size);
+ memcpy (newhinf->digest, oldhinf->digest, MAX_DIGEST_SIZE);
*outhandle = newhinf;
@@ -493,6 +494,11 @@ gc_hash_close (gc_hash handle)
{
hinfo *hinf = (hinfo*) handle;
+ if (hinf->mode == GC_HMAC)
+ {
+ free (hinf->inner);
+ free (hinf->outer);
+ }
free (hinf->context);
free (hinf);
}