diff options
Diffstat (limited to 'src/hash.c')
-rw-r--r-- | src/hash.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -44,8 +44,10 @@ usho do_hash_file(const char *filename, const char *type) do { ret = fread(&buf, 1, BSIZE, fd); - if (ret == -1) + if (ret == -1) { + fclose(fd); return 0; + } hash ^= do_hash((usho *)&buf, ret); } while(ret); |