summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/hash.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/hash.cpp b/src/hash.cpp
index 82df4c0..c4adcd4 100644
--- a/src/hash.cpp
+++ b/src/hash.cpp
@@ -62,10 +62,11 @@ namespace Multihash {
}
void _hash_file(int fileno, Hash* hash) {
- char buf[32768];
+ char* buf = new char[32768];
int s;
while((s = read(fileno, buf, 32768)) > 0) {
hash->_update(buf, s);
}
+ delete buf;
}
}