Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev Fix a resource leak on error handling in audio_alloc...
details: https://anonhg.NetBSD.org/src/rev/da4e4b49eba5
branches: trunk
changeset: 355451:da4e4b49eba5
user: isaki <isaki%NetBSD.org@localhost>
date: Sat Jul 29 06:33:45 2017 +0000
description:
Fix a resource leak on error handling in audio_alloc_ring().
diffstat:
sys/dev/audio.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diffs (26 lines):
diff -r be7afa8fcd1d -r da4e4b49eba5 sys/dev/audio.c
--- a/sys/dev/audio.c Sat Jul 29 06:30:56 2017 +0000
+++ b/sys/dev/audio.c Sat Jul 29 06:33:45 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: audio.c,v 1.379 2017/07/29 06:30:56 isaki Exp $ */
+/* $NetBSD: audio.c,v 1.380 2017/07/29 06:33:45 isaki 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.379 2017/07/29 06:30:56 isaki Exp $");
+__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.380 2017/07/29 06:33:45 isaki Exp $");
#ifdef _KERNEL_OPT
#include "audio.h"
@@ -1228,6 +1228,7 @@
false, 0);
if (error) {
uvm_unmap(kernel_map, vstart, vstart + vsize);
+ uao_detach(r->uobj);
r->uobj = NULL; /* paranoia */
return error;
}
Home |
Main Index |
Thread Index |
Old Index