diff options
author | Harshad Shirwadkar <harshadshirwadkar@gmail.com> | 2021-02-04 15:35:59 -0800 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2021-02-08 23:36:21 -0500 |
commit | 2fae964a0e3d68498a5accfd2fd0780352415660 (patch) | |
tree | 3414df8937a0636bc1366772bcd094eee99d9c97 | |
parent | f15b1aaf8f1241ac55057ec61a0d399147fc644b (diff) | |
download | e2fsprogs-2fae964a0e3d68498a5accfd2fd0780352415660.tar.gz |
ext2fs: initialize handle to NULL in ext2fs_count_blks
Initialize the handle to NULL to ensure that in error cases,
ext2fs_free_mem can be called on it.
Signed-off-by: Harshad Shirwadkar <harshadshirwadkar@gmail.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
-rw-r--r-- | lib/ext2fs/extent.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/ext2fs/extent.c b/lib/ext2fs/extent.c index bde6b0f35..1a87e68b9 100644 --- a/lib/ext2fs/extent.c +++ b/lib/ext2fs/extent.c @@ -1809,7 +1809,7 @@ errcode_t ext2fs_decode_extent(struct ext2fs_extent *to, void *addr, int len) errcode_t ext2fs_count_blocks(ext2_filsys fs, ext2_ino_t ino, struct ext2_inode *inode, blk64_t *ret_count) { - ext2_extent_handle_t handle; + ext2_extent_handle_t handle = NULL; struct ext2fs_extent extent; errcode_t errcode; int i; |