diff options
author | phk <phk@FreeBSD.org> | 2003-06-01 09:24:17 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2003-06-01 09:24:17 +0000 |
commit | 753c73f9f836e9fb2fdad7cbfbf92a133e5fcb49 (patch) | |
tree | 20d7460c5081931457bee5f9b848c5f8cf7bfecd /sys/dev | |
parent | ccba2648b0f0471eb431a273db8797855b70a66b (diff) | |
download | FreeBSD-src-753c73f9f836e9fb2fdad7cbfbf92a133e5fcb49.zip FreeBSD-src-753c73f9f836e9fb2fdad7cbfbf92a133e5fcb49.tar.gz |
Don't leak "barlist" allocation on failure.
Found by: FlexeLint
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/cardbus/cardbus_cis.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/dev/cardbus/cardbus_cis.c b/sys/dev/cardbus/cardbus_cis.c index 2878f13..f036ffa 100644 --- a/sys/dev/cardbus/cardbus_cis.c +++ b/sys/dev/cardbus/cardbus_cis.c @@ -854,6 +854,7 @@ cardbus_alloc_resources(device_t cbdev, device_t child) if (res == NULL) { device_printf(cbdev, "Can't get memory for prefetch mem\n"); + free(barlist, M_DEVBUF); return (EIO); } start = rman_get_start(res); @@ -900,6 +901,7 @@ cardbus_alloc_resources(device_t cbdev, device_t child) if (res == NULL) { device_printf(cbdev, "Can't get memory for non-prefetch mem\n"); + free(barlist, M_DEVBUF); return (EIO); } start = rman_get_start(res); @@ -945,6 +947,7 @@ cardbus_alloc_resources(device_t cbdev, device_t child) if (res == NULL) { device_printf(cbdev, "Can't get memory for IO ports\n"); + free(barlist, M_DEVBUF); return (EIO); } start = rman_get_start(res); @@ -970,6 +973,7 @@ cardbus_alloc_resources(device_t cbdev, device_t child) RF_SHAREABLE); if (res == NULL) { device_printf(cbdev, "Can't get memory for irq\n"); + free(barlist, M_DEVBUF); return (EIO); } start = rman_get_start(res); |