tools: remove unneeded cleanup labels

Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
Daniel Henrique Barboza
2019-11-12 17:54:01 +01:00
committed by Ján Tomko
parent c0666eb7c8
commit 10d6290f1c
3 changed files with 19 additions and 38 deletions
+2 -6
View File
@@ -74,21 +74,17 @@ virshNetworkEventNameCompleter(vshControl *ctl G_GNUC_UNUSED,
unsigned int flags)
{
size_t i = 0;
char **ret = NULL;
VIR_AUTOSTRINGLIST tmp = NULL;
virCheckFlags(0, NULL);
if (VIR_ALLOC_N(tmp, VIR_NETWORK_EVENT_ID_LAST + 1) < 0)
goto cleanup;
return NULL;
for (i = 0; i < VIR_NETWORK_EVENT_ID_LAST; i++)
tmp[i] = g_strdup(virshNetworkEventCallbacks[i].name);
ret = g_steal_pointer(&tmp);
cleanup:
return ret;
return g_steal_pointer(&tmp);
}