virtio: qmp: fix memory leak
authorPaolo Bonzini <pbonzini@redhat.com>
Mon, 15 May 2023 13:26:04 +0000 (15:26 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 26 May 2023 10:34:17 +0000 (12:34 +0200)
commit0bfd14149b248e8097ea4da1f9d53beb5c5b0cca
tree5056134034267d51dd1c824ad11b451c5da97b8b
parent5590615276f217bc875b0fdc6c2351293f55df6c
virtio: qmp: fix memory leak

The VirtioInfoList is already allocated by QAPI_LIST_PREPEND and
need not be allocated by the caller.

Fixes Coverity CID 1508724.

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
hw/virtio/virtio-qmp.c