diff options
author | Joris Vink <joris@cvs.openbsd.org> | 2005-06-02 19:04:19 +0000 |
---|---|---|
committer | Joris Vink <joris@cvs.openbsd.org> | 2005-06-02 19:04:19 +0000 |
commit | be710ddcab4de23714fb24eb7333d8069eb02b81 (patch) | |
tree | 5f84c2901cdd354ea34ea2c753ca8a645c2d04a3 /sys/dev | |
parent | d29905ef0a2a329e21d9966b757e3606cff083ab (diff) |
correctly close the audio device in audio_open() if one of the
precision parameters is zero.
ok tedu@
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/audio.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/dev/audio.c b/sys/dev/audio.c index f0294799216..01137c92a4c 100644 --- a/sys/dev/audio.c +++ b/sys/dev/audio.c @@ -1,4 +1,4 @@ -/* $OpenBSD: audio.c,v 1.45 2005/04/14 05:39:17 brad Exp $ */ +/* $OpenBSD: audio.c,v 1.46 2005/06/02 19:04:18 joris Exp $ */ /* $NetBSD: audio.c,v 1.119 1999/11/09 16:50:47 augustss Exp $ */ /* @@ -1034,7 +1034,8 @@ audio_open(dev, sc, flags, ifmt, p) */ if (sc->sc_rparams.precision == 0 || sc->sc_pparams.precision == 0) { printf("audio_open: 0 precision\n"); - return EINVAL; + error = EINVAL; + goto bad; } #endif |