Module Name: src
Committed By: jmcneill
Date: Wed Jul 13 22:50:24 UTC 2011
Modified Files:
src/sys/dev/dtv: dtv_demux.c
Log Message:
dtv_demux_write: make sure to unlock muted in all error paths
To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/dev/dtv/dtv_demux.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/dtv/dtv_demux.c
diff -u src/sys/dev/dtv/dtv_demux.c:1.1 src/sys/dev/dtv/dtv_demux.c:1.2
--- src/sys/dev/dtv/dtv_demux.c:1.1 Wed Jul 13 22:43:04 2011
+++ src/sys/dev/dtv/dtv_demux.c Wed Jul 13 22:50:24 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: dtv_demux.c,v 1.1 2011/07/13 22:43:04 jmcneill Exp $ */
+/* $NetBSD: dtv_demux.c,v 1.2 2011/07/13 22:50:24 jmcneill Exp $ */
/*-
* Copyright (c) 2011 Jared D. McNeill <[email protected]>
@@ -33,7 +33,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: dtv_demux.c,v 1.1 2011/07/13 22:43:04 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dtv_demux.c,v 1.2 2011/07/13 22:50:24 jmcneill Exp $");
#include <sys/param.h>
#include <sys/types.h>
@@ -449,7 +449,7 @@
if (TS_HAS_PUSI(tspkt)) {
if (brem < 16)
- return 0;
+ goto done;
section_length = ((p[1] & 0xf) << 8) | p[2];
@@ -477,7 +477,7 @@
avail = min(sec->sec_length - sec->sec_bytesused, brem);
if (avail < 0)
- return 0;
+ goto done;
memcpy(&sec->sec_buf[sec->sec_bytesused], p, avail);
sec->sec_bytesused += avail;