Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/audio Release memories on audiobellclose.



details:   https://anonhg.NetBSD.org/src/rev/50f7757e2f08
branches:  trunk
changeset: 745341:50f7757e2f08
user:      isaki <isaki%NetBSD.org@localhost>
date:      Sat Feb 29 07:13:37 2020 +0000

description:
Release memories on audiobellclose.
It's rest of the last commit.

diffstat:

 sys/dev/audio/audio.c |  9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diffs (30 lines):

diff -r ecc0ddb4f177 -r 50f7757e2f08 sys/dev/audio/audio.c
--- a/sys/dev/audio/audio.c     Sat Feb 29 06:34:30 2020 +0000
+++ b/sys/dev/audio/audio.c     Sat Feb 29 07:13:37 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: audio.c,v 1.56 2020/02/23 07:17:01 isaki Exp $ */
+/*     $NetBSD: audio.c,v 1.57 2020/02/29 07:13:37 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.56 2020/02/23 07:17:01 isaki Exp $");
+__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.57 2020/02/29 07:13:37 isaki Exp $");
 
 #ifdef _KERNEL_OPT
 #include "audio.h"
@@ -1956,6 +1956,11 @@
        error = audio_close(sc, file);
 
        audio_file_exit(sc, &sc_ref);
+
+       KASSERT(file->ptrack);
+       audio_track_destroy(file->ptrack);
+       KASSERT(file->rtrack == NULL);
+       kmem_free(file, sizeof(*file));
        return error;
 }
 



Home | Main Index | Thread Index | Old Index