]> xenbits.xensource.com Git - libvirt.git/commit
qemu_domain: Don't unref NULL hash table in qemuDomainRefreshStatsSchema()
authorMichal Privoznik <mprivozn@redhat.com>
Thu, 26 Jan 2023 10:56:10 +0000 (11:56 +0100)
committerMichal Privoznik <mprivozn@redhat.com>
Thu, 26 Jan 2023 12:48:16 +0000 (13:48 +0100)
commitc3afde9211b550d3900edc5386ab121f5b39fd3e
tree45f52c5cd3c46b77571d26daa5051c9c34ed2984
parent95a278a84591b6a4cfa170eba31c8ec60e82f940
qemu_domain: Don't unref NULL hash table in qemuDomainRefreshStatsSchema()

The g_hash_table_unref() function does not accept NULL. Passing
NULL results in a glib warning being triggered. Check whether the
hash table is not NULL and unref it only then.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/qemu/qemu_domain.c