diff options
author | phk <phk@FreeBSD.org> | 2005-03-26 21:58:09 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2005-03-26 21:58:09 +0000 |
commit | 8be33e38e54c679c2447dc877fd3519f3031d4c4 (patch) | |
tree | ed9325283c18b541ed0d6e34b7d511899743478c /sys/dev/mlx/mlx_pci.c | |
parent | 3ace77096ca49bec8064bcaa4f94e860aa9e7518 (diff) | |
download | FreeBSD-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.c | 1 |
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); /* |