diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index b6ad118f1f..881c88d54c 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -11923,7 +11923,8 @@ qemuDomainRefreshStatsSchema(virDomainObj *dom) if (!schema) return -1; - g_hash_table_unref(priv->statsSchema); + if (priv->statsSchema) + g_hash_table_unref(priv->statsSchema); priv->statsSchema = schema; return 0;