diff options
author | Daeho Jeong <daehojeong@google.com> | 2023-11-09 13:33:48 -0800 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2023-11-09 15:38:39 -0800 |
commit | 5e7ebf12784a4e125fcc7310c1188eae690425ba (patch) | |
tree | 97a3f6fe73d2f8de519e362ec47ebcf665dc0ad3 | |
parent | f71fbf8f3dee4eefdddac1abaaf4ae76bb9a48b3 (diff) | |
download | f2fs-tools-5e7ebf12784a4e125fcc7310c1188eae690425ba.tar.gz |
f2fs-tools: initialize user cache valid values
Need to initialize user cache valid values to prevent from providing
false cache entries.
Signed-off-by: Daeho Jeong <daehojeong@google.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
-rw-r--r-- | lib/libf2fs_io.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libf2fs_io.c b/lib/libf2fs_io.c index 39d3777..d76da83 100644 --- a/lib/libf2fs_io.c +++ b/lib/libf2fs_io.c @@ -165,7 +165,7 @@ static int dcache_alloc_all(long n) || (dcache_lastused = (uint64_t *) malloc(sizeof(uint64_t) * n)) == NULL || (dcache_buf = (char *) malloc (F2FS_BLKSIZE * n)) == NULL - || (dcache_valid = (bool *) malloc(sizeof(bool) * n)) == NULL) + || (dcache_valid = (bool *) calloc(sizeof(bool) * n, 1)) == NULL) { dcache_release(); return -1; |