Module Name: src Committed By: isaki Date: Wed Jul 10 13:17:57 UTC 2019
Modified Files: src/sys/dev/audio: audio.c Log Message: Fix freem() argument. The 3rd argument is bufsize, not direction... To generate a diff of this commit: cvs rdiff -u -r1.26 -r1.27 src/sys/dev/audio/audio.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/dev/audio/audio.c diff -u src/sys/dev/audio/audio.c:1.26 src/sys/dev/audio/audio.c:1.27 --- src/sys/dev/audio/audio.c:1.26 Sun Jul 7 06:29:14 2019 +++ src/sys/dev/audio/audio.c Wed Jul 10 13:17:57 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: audio.c,v 1.26 2019/07/07 06:29:14 isaki Exp $ */ +/* $NetBSD: audio.c,v 1.27 2019/07/10 13:17:57 isaki Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -142,7 +142,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.26 2019/07/07 06:29:14 isaki Exp $"); +__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.27 2019/07/10 13:17:57 isaki Exp $"); #ifdef _KERNEL_OPT #include "audio.h" @@ -4801,16 +4801,15 @@ abort: static void audio_mixer_destroy(struct audio_softc *sc, audio_trackmixer_t *mixer) { - int mode; + int bufsize; KASSERT(mutex_owned(sc->sc_lock)); - mode = mixer->mode; - KASSERT(mode == AUMODE_PLAY || mode == AUMODE_RECORD); + bufsize = frametobyte(&mixer->hwbuf.fmt, mixer->hwbuf.capacity); if (mixer->hwbuf.mem != NULL) { if (sc->hw_if->freem) { - sc->hw_if->freem(sc->hw_hdl, mixer->hwbuf.mem, mode); + sc->hw_if->freem(sc->hw_hdl, mixer->hwbuf.mem, bufsize); } else { kern_free(mixer->hwbuf.mem); }