summaryrefslogtreecommitdiffstats
path: root/sys/dev/mlx/mlx_pci.c
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2005-03-26 21:58:09 +0000
committerphk <phk@FreeBSD.org>2005-03-26 21:58:09 +0000
commit8be33e38e54c679c2447dc877fd3519f3031d4c4 (patch)
treeed9325283c18b541ed0d6e34b7d511899743478c /sys/dev/mlx/mlx_pci.c
parent3ace77096ca49bec8064bcaa4f94e860aa9e7518 (diff)
downloadFreeBSD-src-8be33e38e54c679c2447dc877fd3519f3031d4c4.zip
FreeBSD-src-8be33e38e54c679c2447dc877fd3519f3031d4c4.tar.gz
Don't call mlx_free() i mlx_attach() in case of failure. Doing so
in mlx_attach_pci() is much cleaner. Inspired by: Coverity
Diffstat (limited to 'sys/dev/mlx/mlx_pci.c')
-rw-r--r--sys/dev/mlx/mlx_pci.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/dev/mlx/mlx_pci.c b/sys/dev/mlx/mlx_pci.c
index 7e4b01a..da04278e 100644
--- a/sys/dev/mlx/mlx_pci.c
+++ b/sys/dev/mlx/mlx_pci.c
@@ -215,6 +215,7 @@ mlx_pci_attach(device_t dev)
*/
error = mlx_attach(sc);
if (error != 0)
+ mlx_free(sc);
return(error);
/*
OpenPOWER on IntegriCloud