Signed-off-by: Toralf Förster <[email protected]>
---
lib/md5_file.cpp | 2 ++
1 file changed, 2 insertions(+)
diff --git a/lib/md5_file.cpp b/lib/md5_file.cpp
index a3f2b05..dfa5d0b 100644
--- a/lib/md5_file.cpp
+++ b/lib/md5_file.cpp
@@ -70,9 +70,11 @@ int md5_file(const char* path, char* output, double& nbytes,
bool is_gzip) {
if (is_gzip) {
n = (int)fread(buf, 1, 10, f);
if (n != 10) {
+ fclose(f);
return ERR_BAD_FORMAT;
}
if (buf[0] != 0x1f || buf[1] != 0x8b || buf[2] != 0x08) {
+ fclose(f);
return ERR_BAD_FORMAT;
}
nbytes = 10;
--
2.0.0
_______________________________________________
boinc_dev mailing list
[email protected]
http://lists.ssl.berkeley.edu/mailman/listinfo/boinc_dev
To unsubscribe, visit the above URL and
(near bottom of page) enter your email address.