qemu with hax to log dma reads & writes jcs.org/2018/11/12/vfio

qcow2: fix two memory leaks in qcow2_open error code path

Signed-off-by: Prasad Joshi <prasadjoshi.linux@gmail.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>

authored by

Prasad Joshi and committed by
Stefan Hajnoczi
c5a33ee9 4c709660

+4
+4
block/qcow2.c
··· 506 506 s->incompatible_features & 507 507 ~QCOW2_INCOMPAT_MASK); 508 508 ret = -ENOTSUP; 509 + g_free(feature_table); 509 510 goto fail; 510 511 } 511 512 ··· 744 745 s->l1_table = NULL; 745 746 if (s->l2_table_cache) { 746 747 qcow2_cache_destroy(bs, s->l2_table_cache); 748 + } 749 + if (s->refcount_block_cache) { 750 + qcow2_cache_destroy(bs, s->refcount_block_cache); 747 751 } 748 752 g_free(s->cluster_cache); 749 753 qemu_vfree(s->cluster_data);