[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 1/6] block: Avoid memleak on qcow2 image info failure
From: |
Max Reitz |
Subject: |
[PULL 1/6] block: Avoid memleak on qcow2 image info failure |
Date: |
Tue, 24 Mar 2020 13:20:39 +0100 |
From: Eric Blake <address@hidden>
If we fail to get bitmap info, we must not leak the encryption info.
Fixes: b8968c875f403
Fixes: Coverity CID 1421894
Signed-off-by: Eric Blake <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Vladimir Sementsov-Ogievskiy <address@hidden>
Reviewed-by: Andrey Shinkevich <address@hidden>
Tested-by: Andrey Shinkevich <address@hidden>
Signed-off-by: Max Reitz <address@hidden>
---
block/qcow2.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/block/qcow2.c b/block/qcow2.c
index d44b45633d..e08917ed84 100644
--- a/block/qcow2.c
+++ b/block/qcow2.c
@@ -4811,6 +4811,7 @@ static ImageInfoSpecific
*qcow2_get_specific_info(BlockDriverState *bs,
if (local_err) {
error_propagate(errp, local_err);
qapi_free_ImageInfoSpecific(spec_info);
+ qapi_free_QCryptoBlockInfo(encrypt_info);
return NULL;
}
*spec_info->u.qcow2.data = (ImageInfoSpecificQCow2){
--
2.25.1
- [PULL 0/6] Block patches for 5.0-rc0, Max Reitz, 2020/03/24
- [PULL 1/6] block: Avoid memleak on qcow2 image info failure,
Max Reitz <=
- [PULL 2/6] block: Assert BlockDriver::format_name is not NULL, Max Reitz, 2020/03/24
- [PULL 3/6] block: bdrv_set_backing_bs: fix use-after-free, Max Reitz, 2020/03/24
- [PULL 4/6] block/qcow2: zero data_file child after free, Max Reitz, 2020/03/24
- [PULL 5/6] iotests: Fix cleanup path in some tests, Max Reitz, 2020/03/24
- [PULL 6/6] iotests/026: Move v3-exclusive test to new file, Max Reitz, 2020/03/24
- Re: [PULL 0/6] Block patches for 5.0-rc0, Peter Maydell, 2020/03/24