diff options
author | imp <imp@FreeBSD.org> | 2005-07-15 06:08:26 +0000 |
---|---|---|
committer | imp <imp@FreeBSD.org> | 2005-07-15 06:08:26 +0000 |
commit | 1406943c0dfd50aa21bf3013e20d395759a41605 (patch) | |
tree | 499c6b4c3cccf1e273a04dd1ef9c5916caf8a5b7 /sys/dev/xe | |
parent | c5afaba5b2aad570770d3c5f929bd4823d599ff1 (diff) | |
download | FreeBSD-src-1406943c0dfd50aa21bf3013e20d395759a41605.zip FreeBSD-src-1406943c0dfd50aa21bf3013e20d395759a41605.tar.gz |
Fix a couple of leaking situations when errors happen.
Diffstat (limited to 'sys/dev/xe')
-rw-r--r-- | sys/dev/xe/if_xe.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/dev/xe/if_xe.c b/sys/dev/xe/if_xe.c index cb4f636..f95295f 100644 --- a/sys/dev/xe/if_xe.c +++ b/sys/dev/xe/if_xe.c @@ -1887,6 +1887,7 @@ xe_activate(device_t dev) 8, RF_ACTIVE); if (!sc->ce2_port_res) { DEVPRINTF(1, (dev, "Cannot allocate I/O port for modem\n")); + xe_deactivate(dev); return ENOMEM; } @@ -1914,6 +1915,7 @@ xe_activate(device_t dev) if (!sc->port_res) { DEVPRINTF(1, (dev, "Cannot allocate ioport\n")); + xe_deactivate(dev); return ENOMEM; } |