summary refs log tree commit diff
path: root/nix/libutil/gcrypt-hash.cc
diff options
context:
space:
mode:
Diffstat (limited to 'nix/libutil/gcrypt-hash.cc')
-rw-r--r--nix/libutil/gcrypt-hash.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/nix/libutil/gcrypt-hash.cc b/nix/libutil/gcrypt-hash.cc
index 553f633b93..c4ae7bfcc2 100644
--- a/nix/libutil/gcrypt-hash.cc
+++ b/nix/libutil/gcrypt-hash.cc
@@ -45,6 +45,7 @@ guix_hash_final (void *resbuf, struct guix_hash_context *ctx,
   memcpy (resbuf, gcry_md_read (ctx->md_handle, algo),
 	  gcry_md_get_algo_dlen (algo));
   gcry_md_close (ctx->md_handle);
+  ctx->md_handle = NULL;
 }
 
 }