If bus_generic_susped returns an error, devlist is not freed. Free it.

Submitted by: Ted Unangst (using the Coverity Prevent analysis tool)
This commit is contained in:
Warner Losh 2005-03-15 22:53:31 +00:00
parent e0251bbbe7
commit 463ec0ac87

View file

@ -1059,8 +1059,10 @@ pci_suspend(device_t dev)
/* Suspend devices before potentially powering them down. */
error = bus_generic_suspend(dev);
if (error)
if (error) {
free(devlist, M_TEMP);
return (error);
}
/*
* Always set the device to D3. If ACPI suggests a different