If mlx_attach() returns an error, don't free sc again.
Spotted by: Ted Unangst using the Coverity Prevent static analysis tool Reviewed by: scottl
This commit is contained in:
parent
14f1a8cc08
commit
730eb84011
@ -214,10 +214,8 @@ mlx_pci_attach(device_t dev)
|
||||
* Do bus-independant initialisation.
|
||||
*/
|
||||
error = mlx_attach(sc);
|
||||
if (error != 0) {
|
||||
mlx_free(sc);
|
||||
if (error != 0)
|
||||
return(error);
|
||||
}
|
||||
|
||||
/*
|
||||
* Start the controller.
|
||||
|
Loading…
Reference in New Issue
Block a user