diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2005-09-12 18:47:51 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2005-09-12 18:47:51 +0000 |
commit | c342f249150f07f313ae6a8abf3e3df0a2e89d08 (patch) | |
tree | 810197acf7f91107e5785006b8741bc140899449 /sys/dev/cardbus | |
parent | 81baa7094f29ba00a095b272db9f43058733601d (diff) |
Do not leak memory if cardbus_read_exrom() fails; ok fgs@
Diffstat (limited to 'sys/dev/cardbus')
-rw-r--r-- | sys/dev/cardbus/cardbus.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/cardbus/cardbus.c b/sys/dev/cardbus/cardbus.c index fb0e5832def..03a3087d159 100644 --- a/sys/dev/cardbus/cardbus.c +++ b/sys/dev/cardbus/cardbus.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cardbus.c,v 1.26 2005/09/12 17:16:48 fgsch Exp $ */ +/* $OpenBSD: cardbus.c,v 1.27 2005/09/12 18:47:50 miod Exp $ */ /* $NetBSD: cardbus.c,v 1.24 2000/04/02 19:11:37 mycroft Exp $ */ /* @@ -243,11 +243,11 @@ cardbus_read_tuples(struct cardbus_attach_args *ca, cardbusreg_t cis_ptr, break; } + out: while ((p = SIMPLEQ_FIRST(&rom_image)) != NULL) { SIMPLEQ_REMOVE_HEAD(&rom_image, next); free(p, M_DEVBUF); } - out: exrom = cardbus_conf_read(cc, cf, tag, reg); cardbus_conf_write(cc, cf, tag, reg, exrom & ~1); splx(save); |