diff --git a/src/redis-check-aof.c b/src/redis-check-aof.c index 616177a8b..d39ac6109 100644 --- a/src/redis-check-aof.c +++ b/src/redis-check-aof.c @@ -238,6 +238,7 @@ int checkSingleAof(char *aof_filename, char *aof_filepath, int last_file, int fi off_t size = sb.st_size; if (size == 0) { + fclose(fp); return AOF_CHECK_EMPTY; }