Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev Plug memory leak as the mixer state does not grow or...
details: https://anonhg.NetBSD.org/src/rev/d823418a3ea5
branches: trunk
changeset: 357548:d823418a3ea5
user: nat <nat%NetBSD.org@localhost>
date: Wed Nov 15 01:49:59 2017 +0000
description:
Plug memory leak as the mixer state does not grow or shrink when audio
mixing is disabled. This avoids triggering a panic also.
diffstat:
sys/dev/audio.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diffs (28 lines):
diff -r 4518011e377b -r d823418a3ea5 sys/dev/audio.c
--- a/sys/dev/audio.c Wed Nov 15 01:45:57 2017 +0000
+++ b/sys/dev/audio.c Wed Nov 15 01:49:59 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: audio.c,v 1.432 2017/11/15 01:45:57 nat Exp $ */
+/* $NetBSD: audio.c,v 1.433 2017/11/15 01:49:59 nat Exp $ */
/*-
* Copyright (c) 2016 Nathanial Sloss <nathanialsloss%yahoo.com.au@localhost>
@@ -148,7 +148,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.432 2017/11/15 01:45:57 nat Exp $");
+__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.433 2017/11/15 01:49:59 nat Exp $");
#ifdef _KERNEL_OPT
#include "audio.h"
@@ -2310,7 +2310,8 @@
DPRINTF(("audio_open: done sc_mode = 0x%x\n", vc->sc_mode));
- grow_mixer_states(sc, 2);
+ if (sc->sc_usemixer)
+ grow_mixer_states(sc, 2);
if (flags & FREAD)
sc->sc_recopens++;
if (flags & FWRITE)
Home |
Main Index |
Thread Index |
Old Index