Signed-off-by: Tim Wiederhake <twiederh(a)redhat.com>
---
src/hyperv/hyperv_wmi.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/src/hyperv/hyperv_wmi.c b/src/hyperv/hyperv_wmi.c
index b113283aeb..dc2c6471ab 100644
--- a/src/hyperv/hyperv_wmi.c
+++ b/src/hyperv/hyperv_wmi.c
@@ -275,7 +275,7 @@ hypervCreateEmbeddedParam(hypervWmiClassInfo *classInfo)
{
size_t i;
size_t count;
- g_autoptr(GHashTable) table = NULL;
+ g_autoptr(GHashTable) table = virHashNew(NULL);
XmlSerializerInfo *typeinfo = NULL;
typeinfo = classInfo->serializerInfo;
@@ -284,10 +284,6 @@ hypervCreateEmbeddedParam(hypervWmiClassInfo *classInfo)
for (count = 0; typeinfo[count].name != NULL; count++)
;
- table = virHashNew(NULL);
- if (table == NULL)
- return NULL;
-
for (i = 0; typeinfo[i].name != NULL; i++) {
XmlSerializerInfo *item = &typeinfo[i];
--
2.31.1