]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
Fix.
authorSimon Josefsson <simon@josefsson.org>
Mon, 16 Aug 2004 20:21:02 +0000 (20:21 +0000)
committerSimon Josefsson <simon@josefsson.org>
Mon, 16 Aug 2004 20:21:02 +0000 (20:21 +0000)
crypto/gc-nettle.c

index dc38c5f7acabcbfdeb3718c47d70bc992564abcc..18669c1c6dcc55d34d31b026093fc24c5afb9a30 100644 (file)
@@ -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);
 }