aboutsummaryrefslogtreecommitdiff
path: root/src/util/crypto_hash.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2010-10-08 15:42:50 +0000
committerChristian Grothoff <christian@grothoff.org>2010-10-08 15:42:50 +0000
commit44c422c7f8c41790372eb85c32389a3e3dbe0cdc (patch)
tree3f124c4887ab839fe84db814df37ff62243b421a /src/util/crypto_hash.c
parent40c44dfea1fd283af8340419f4dc313b57bee820 (diff)
downloadgnunet-44c422c7f8c41790372eb85c32389a3e3dbe0cdc.tar.gz
gnunet-44c422c7f8c41790372eb85c32389a3e3dbe0cdc.zip
fix
Diffstat (limited to 'src/util/crypto_hash.c')
-rw-r--r--src/util/crypto_hash.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/util/crypto_hash.c b/src/util/crypto_hash.c
index 2217e6223..ab6fc28cf 100644
--- a/src/util/crypto_hash.c
+++ b/src/util/crypto_hash.c
@@ -127,6 +127,7 @@ file_hash_finish (struct GNUNET_CRYPTO_FileHashContext *fhc,
127 GNUNET_free (fhc->filename); 127 GNUNET_free (fhc->filename);
128 if (!GNUNET_DISK_handle_invalid (fhc->fh)) 128 if (!GNUNET_DISK_handle_invalid (fhc->fh))
129 GNUNET_break (GNUNET_OK == GNUNET_DISK_file_close (fhc->fh)); 129 GNUNET_break (GNUNET_OK == GNUNET_DISK_file_close (fhc->fh));
130 gcry_md_close (fhc->md);
130 GNUNET_free (fhc); /* also frees fhc->buffer */ 131 GNUNET_free (fhc); /* also frees fhc->buffer */
131} 132}
132 133
@@ -162,7 +163,6 @@ file_hash_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
162 { 163 {
163 res = (GNUNET_HashCode *) gcry_md_read (fhc->md, GCRY_MD_SHA512); 164 res = (GNUNET_HashCode *) gcry_md_read (fhc->md, GCRY_MD_SHA512);
164 file_hash_finish (fhc, res); 165 file_hash_finish (fhc, res);
165 gcry_md_close (fhc->md);
166 return; 166 return;
167 } 167 }
168 fhc->task 168 fhc->task