Damien Zammit, le dim. 07 mars 2021 09:36:26 +1100, a ecrit: > devices = realloc(pci_sys->devices, (pci_sys->num_devices + 1) > * sizeof(struct pci_device_private)); > if (!devices) { > - if (closedir(dir) < 0) > - return errno; > return ENOMEM; > }
Missing mach_port_deallocate (mach_task_self (), device_port); ? > @@ -489,6 +508,11 @@ pci_system_hurd_create(void) > { > int err; > struct pci_system_hurd *pci_sys_hurd; > + mach_port_t device_master; > + mach_port_t root = MACH_PORT_NULL; > + const char *sbpci = _SERVERS_BUS_PCI; > + const char *dot = "."; > + char *rootpath = (char *)dot; Why not making rootpath a const char *? That'll avoid all the casts (and I would rather not use the dot and sbpci variables, and just directly initialize root path to "." and below set it to _SERVERS_BUS_PCI). Samuel