[PATCH] qemu_domain: Don't unref NULL hash table in qemuDomainRefreshStatsSchema()

Ján Tomko jtomko at redhat.com
Thu Jan 26 12:46:09 UTC 2023


On a Thursday in 2023, Michal Privoznik wrote:
>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 at redhat.com>
>---
> src/qemu/qemu_domain.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>

Reviewed-by: Ján Tomko <jtomko at redhat.com>

Jano
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20230126/9847e80d/attachment.sig>


More information about the libvir-list mailing list