diff options
Diffstat (limited to 'cgpt/cmd_find.c')
-rw-r--r-- | cgpt/cmd_find.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/cgpt/cmd_find.c b/cgpt/cmd_find.c index 3802902b..511518d5 100644 --- a/cgpt/cmd_find.c +++ b/cgpt/cmd_find.c @@ -46,8 +46,10 @@ static uint8_t *ReadFile(const char *filename, uint64_t *size) { fseek(f, 0, SEEK_END); pos = ftell(f); - if (pos < 0) + if (pos < 0) { + fclose(f); return NULL; + } *size = pos; rewind(f); |