diff options
author | 2005-06-02 19:04:18 +0000 | |
---|---|---|
committer | 2005-06-02 19:04:18 +0000 | |
commit | fdd3d40d54752fc1844e44a394f5cf8e798a4d9e (patch) | |
tree | e7cab6783eeab6555b20e4a68fbc97c65b58f638 | |
parent | tsc, ryan left debug crap behind (diff) | |
download | wireguard-openbsd-fdd3d40d54752fc1844e44a394f5cf8e798a4d9e.tar.xz wireguard-openbsd-fdd3d40d54752fc1844e44a394f5cf8e798a4d9e.zip |
correctly close the audio device in audio_open() if one of the
precision parameters is zero.
ok tedu@
-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 |