[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] block: Avoid memleak on qcow2 image info failure

From: Vladimir Sementsov-Ogievskiy
Subject: Re: [PATCH] block: Avoid memleak on qcow2 image info failure
Date: Mon, 23 Mar 2020 09:51:08 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1

20.03.2020 21:36, Eric Blake wrote:
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>
  block/qcow2.c | 1 +
  1 file changed, 1 insertion(+)

diff --git a/block/qcow2.c b/block/qcow2.c
index d44b45633dbb..e08917ed8462 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_QCryptoBlockInfo(encrypt_info);
              return NULL;
          *spec_info->u.qcow2.data = (ImageInfoSpecificQCow2){

Reviewed-by: Vladimir Sementsov-Ogievskiy <address@hidden>

Best regards,

reply via email to

[Prev in Thread] Current Thread [Next in Thread]