summaryrefslogtreecommitdiffstats
path: root/sys/dev/mlx
diff options
context:
space:
mode:
authordas <das@FreeBSD.org>2005-03-18 05:43:37 +0000
committerdas <das@FreeBSD.org>2005-03-18 05:43:37 +0000
commitc1de26c2a069664351ad0a5c53456d34e9e29e5e (patch)
tree6d698e26612955fd0dc67c366868b4597c26f82e /sys/dev/mlx
parent64406ce1fb5254fb3009150968e2acc45648725e (diff)
downloadFreeBSD-src-c1de26c2a069664351ad0a5c53456d34e9e29e5e.zip
FreeBSD-src-c1de26c2a069664351ad0a5c53456d34e9e29e5e.tar.gz
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
Diffstat (limited to 'sys/dev/mlx')
-rw-r--r--sys/dev/mlx/mlx_pci.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/sys/dev/mlx/mlx_pci.c b/sys/dev/mlx/mlx_pci.c
index 6c2fe87..7e4b01a 100644
--- a/sys/dev/mlx/mlx_pci.c
+++ b/sys/dev/mlx/mlx_pci.c
@@ -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.
OpenPOWER on IntegriCloud