diff options
author | Dmitry Belyavskiy <beldmit@gmail.com> | 2019-09-21 16:31:38 +0300 |
---|---|---|
committer | Dmitry Belyavskiy <beldmit@gmail.com> | 2019-09-21 16:31:38 +0300 |
commit | b1729b7368bf10661844c90ac470238eadd1ae7c (patch) | |
tree | 37eba7f7b2a6d6be1214be378e0d93915de9b47a | |
parent | 01cd4a8ee6f92239c4cc36364e24d14e12933ab5 (diff) | |
download | gost-engine-b1729b7368bf10661844c90ac470238eadd1ae7c.zip gost-engine-b1729b7368bf10661844c90ac470238eadd1ae7c.tar.gz gost-engine-b1729b7368bf10661844c90ac470238eadd1ae7c.tar.bz2 |
Fix resource leak. CID 253277
-rw-r--r-- | gost12sum.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/gost12sum.c b/gost12sum.c index 33482a4..b44fe3b 100644 --- a/gost12sum.c +++ b/gost12sum.c @@ -209,6 +209,7 @@ int hash_file(gost_hash_ctx * ctx, char *filename, char *sum, int mode, } if (!hash_stream(ctx, fd, sum, hashsize)) { perror(filename); + close(fd); return 0; } close(fd); |