git://developer.intra2net.com
/
libi2ncommon
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
stop leaking FILE* objects when hashing
[libi2ncommon]
/
src
/
crypto.cpp
diff --git
a/src/crypto.cpp
b/src/crypto.cpp
index
d08f5d6
..
2aeb614
100644
(file)
--- a/
src/crypto.cpp
+++ b/
src/crypto.cpp
@@
-168,9
+168,10
@@
string I2n::hash_file(string filename, algorithm algo)
}
}
+ fclose(file);
+
if (!EVP_DigestFinal_ex(ctx.get(), ret.get(), &olen))
{
- fclose(file);
throw runtime_error(ERROR_MESSAGE);
}