diff options
author | Gao Xiang <hsiangkao@aol.com> | 2019-08-25 09:41:50 +0800 |
---|---|---|
committer | Gao Xiang <hsiangkao@aol.com> | 2019-08-26 23:48:39 +0800 |
commit | 12f17d8373635cdbaf6d16afe72bbd0371820a95 (patch) | |
tree | 0266f42f4416ed35565ecf9039b89d8125c60801 | |
parent | 4b71ae0e2d025700a02ce485c3d49b5bf97cf638 (diff) |
erofs-utils: fix a memory leak of compressmeta
compressmeta should be freed after successfully written.
Reviewed-by: Li Guifu <blucerlee@gmail.com>
Signed-off-by: Gao Xiang <hsiangkao@aol.com>
-rw-r--r-- | lib/inode.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/inode.c b/lib/inode.c index 581f263..141a300 100644 --- a/lib/inode.c +++ b/lib/inode.c @@ -404,6 +404,7 @@ static bool erofs_bh_flush_write_inode(struct erofs_buffer_head *bh) ret = dev_write(inode->compressmeta, off, inode->extent_isize); if (ret) return false; + free(inode->compressmeta); } inode->bh = NULL; |