mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-22 12:35:17 +00:00
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:
parent
fd5df67dce
commit
366891533f
@ -300,7 +300,6 @@ udevConnectListAllInterfaces(virConnectPtr conn,
|
|||||||
struct udev_list_entry *dev_entry;
|
struct udev_list_entry *dev_entry;
|
||||||
virInterfacePtr *ifaces_list = NULL;
|
virInterfacePtr *ifaces_list = NULL;
|
||||||
virInterfacePtr iface_obj;
|
virInterfacePtr iface_obj;
|
||||||
int tmp_count;
|
|
||||||
int count = 0;
|
int count = 0;
|
||||||
int status = 0;
|
int status = 0;
|
||||||
int ret = -1;
|
int ret = -1;
|
||||||
@ -405,14 +404,6 @@ udevConnectListAllInterfaces(virConnectPtr conn,
|
|||||||
if (enumerate)
|
if (enumerate)
|
||||||
udev_enumerate_unref(enumerate);
|
udev_enumerate_unref(enumerate);
|
||||||
udev_unref(udev);
|
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;
|
return ret;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user