]> xenbits.xensource.com Git - libvirt.git/commit
qemu: Avoid memory leak in qemuMonitorJSONExtractQueryStatsSchema
authorJiri Denemark <jdenemar@redhat.com>
Wed, 2 Nov 2022 14:52:31 +0000 (15:52 +0100)
committerJiri Denemark <jdenemar@redhat.com>
Wed, 2 Nov 2022 15:10:38 +0000 (16:10 +0100)
commita607baf65a66491d5bcbca1e3fa4e672a9ec8611
tree3ca5786b68b58aac9b920a0411e1d372aa7dd2e6
parent6eb02a0086d6c5a52ac74ae5dad95bee2cdf0cd5
qemu: Avoid memory leak in qemuMonitorJSONExtractQueryStatsSchema

In a rare case when virHashAddEntry fails we would just leak the
structure we wanted to add to the hash table.

Fixes: e89acdbc3bbada2f3c1a591278bc975ddee2d5a9
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/qemu/qemu_monitor_json.c