Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx> --- src/hyperv/hyperv_wmi.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/hyperv/hyperv_wmi.c b/src/hyperv/hyperv_wmi.c index 2faa2f396f..489bb03a9b 100644 --- a/src/hyperv/hyperv_wmi.c +++ b/src/hyperv/hyperv_wmi.c @@ -325,7 +325,7 @@ hypervCreateEmbeddedParam(hypervPrivate *priv, hypervWmiClassInfoListPtr info) /* Get the typeinfo out of the class info list */ if (hypervGetWmiClassInfo(priv, info, &classInfo) < 0) - goto error; + return NULL; typeinfo = classInfo->serializerInfo; @@ -335,19 +335,16 @@ hypervCreateEmbeddedParam(hypervPrivate *priv, hypervWmiClassInfoListPtr info) table = virHashCreate(count, NULL); if (table == NULL) - goto error; + return NULL; for (i = 0; typeinfo[i].name != NULL; i++) { item = &typeinfo[i]; if (virHashAddEntry(table, item->name, NULL) < 0) - goto error; + return NULL; } return g_steal_pointer(&table); - - error: - return NULL; } -- 2.26.2