]> git.ipfire.org Git - thirdparty/qemu.git/commit
block: Avoid memleak on qcow2 image info failure
authorEric Blake <eblake@redhat.com>
Fri, 20 Mar 2020 18:36:20 +0000 (13:36 -0500)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Mon, 22 Jun 2020 17:52:01 +0000 (12:52 -0500)
commit47e0fa74799c23dc29ff0adb356d82425b166231
tree3629b2fa4c092fcbb16cce83a790c58359f0f95b
parent745859d5bf33f5ff80f00499c822079d9335d3ed
block: Avoid memleak on qcow2 image info failure

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 <eblake@redhat.com>
Message-Id: <20200320183620.1112123-1-eblake@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Andrey Shinkevich <andrey.shinkevich@virtuozzo.com>
Tested-by: Andrey Shinkevich <andrey.shinkevich@virtuozzo.com>
Signed-off-by: Max Reitz <mreitz@redhat.com>
(cherry picked from commit 71eaec2e8c7c8d266137b5c5f42da0bd6d6b5eb7)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
block/qcow2.c