udevConnectListAllInterfaces: delete pointless cleanup code

We only jump to cleanup before allocating any lists.

Drop the dead code.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
Ján Tomko 2020-11-20 14:10:58 +01:00
parent fd5df67dce
commit 366891533f

View File

@ -300,7 +300,6 @@ udevConnectListAllInterfaces(virConnectPtr conn,
struct udev_list_entry *dev_entry;
virInterfacePtr *ifaces_list = NULL;
virInterfacePtr iface_obj;
int tmp_count;
int count = 0;
int status = 0;
int ret = -1;
@ -405,14 +404,6 @@ udevConnectListAllInterfaces(virConnectPtr conn,
if (enumerate)
udev_enumerate_unref(enumerate);
udev_unref(udev);
if (ifaces) {
for (tmp_count = 0; tmp_count < count; tmp_count++)
virObjectUnref(ifaces_list[tmp_count]);
}
VIR_FREE(ifaces_list);
return ret;
}