From: Dmitry Belyavskiy Date: Sat, 21 Sep 2019 13:31:38 +0000 (+0300) Subject: Fix resource leak. CID 253277 X-Git-Tag: v3.0.0~267 X-Git-Url: http://wagner.pp.ru/gitweb/?a=commitdiff_plain;h=b1729b7368bf10661844c90ac470238eadd1ae7c;p=openssl-gost%2Fengine.git Fix resource leak. CID 253277 --- 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);