Fix a memory leak in ipmi_unload().

CID:		1542
Found by:	Coverity Prevent
This commit is contained in:
John Baldwin 2006-09-26 15:48:13 +00:00
parent 3aaadbcce2
commit bec0c98eae

View File

@ -949,9 +949,11 @@ ipmi_unload(void *arg)
int count;
int i;
devclass_get_devices(ipmi_devclass, &devs, &count);
if (devclass_get_devices(ipmi_devclass, &devs, &count) != 0)
return;
for (i = 0; i < count; i++)
device_delete_child(device_get_parent(devs[i]), devs[i]);
free(devs, M_TEMP);
}
SYSUNINIT(ipmi_unload, SI_SUB_DRIVERS, SI_ORDER_FIRST, ipmi_unload, NULL);