[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 01/18] qcow2: fix memory leak in qcow2_read_extensions
From: |
Kevin Wolf |
Subject: |
[PULL 01/18] qcow2: fix memory leak in qcow2_read_extensions |
Date: |
Fri, 30 Sep 2022 18:52:05 +0200 |
From: lu zhipeng <luzhipeng@cestc.cn>
Free feature_table if it is failed in bdrv_pread.
Signed-off-by: lu zhipeng <luzhipeng@cestc.cn>
Message-Id: <20220921144515.1166-1-luzhipeng@cestc.cn>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
block/qcow2.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/block/qcow2.c b/block/qcow2.c
index c6c6692fb7..c8fc3a6160 100644
--- a/block/qcow2.c
+++ b/block/qcow2.c
@@ -275,6 +275,7 @@ static int qcow2_read_extensions(BlockDriverState *bs,
uint64_t start_offset,
if (ret < 0) {
error_setg_errno(errp, -ret, "ERROR: ext_feature_table: "
"Could not read table");
+ g_free(feature_table);
return ret;
}
--
2.37.3
- [PULL 00/18] Block layer patches, Kevin Wolf, 2022/09/30
- [PULL 03/18] qemu-img: Wean documentation and help output off '?' for help, Kevin Wolf, 2022/09/30
- [PULL 02/18] block/qcow2-bitmap: Add missing cast to silent GCC error, Kevin Wolf, 2022/09/30
- [PULL 01/18] qcow2: fix memory leak in qcow2_read_extensions,
Kevin Wolf <=
- [PULL 04/18] block: pass OnOffAuto instead of bool to block_acct_setup(), Kevin Wolf, 2022/09/30
- [PULL 05/18] block: add missed block_acct_setup with new block device init procedure, Kevin Wolf, 2022/09/30
- [PULL 06/18] block: use bdrv_is_sg() helper instead of raw bs->sg reading, Kevin Wolf, 2022/09/30
- [PULL 08/18] gluster: stop using .bdrv_needs_filename, Kevin Wolf, 2022/09/30
- [PULL 07/18] block: make serializing requests functions 'void', Kevin Wolf, 2022/09/30
- [PULL 09/18] block/qcow2: Keep auto_backing_file if possible, Kevin Wolf, 2022/09/30
- [PULL 11/18] iotests/backing-file-invalidation: Add new test, Kevin Wolf, 2022/09/30
- [PULL 13/18] block: use the request length for iov alignment, Kevin Wolf, 2022/09/30
- [PULL 12/18] block: move bdrv_qiov_is_aligned to file-posix, Kevin Wolf, 2022/09/30
- [PULL 10/18] block/qed: Keep auto_backing_file if possible, Kevin Wolf, 2022/09/30