From e574760fc9b4a5f7b40895986acbb02de14bb3b6 Mon Sep 17 00:00:00 2001 From: yamt Date: Thu, 26 Jul 2012 10:13:33 +0000 Subject: [PATCH] fix request leak. --- sys/dev/putter/putter.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/sys/dev/putter/putter.c b/sys/dev/putter/putter.c index e9d21e467e19..21bf41d4d134 100644 --- a/sys/dev/putter/putter.c +++ b/sys/dev/putter/putter.c @@ -1,4 +1,4 @@ -/* $NetBSD: putter.c,v 1.32 2011/07/23 14:28:28 hannken Exp $ */ +/* $NetBSD: putter.c,v 1.33 2012/07/26 10:13:33 yamt Exp $ */ /* * Copyright (c) 2006, 2007 Antti Kantee. All Rights Reserved. @@ -35,7 +35,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: putter.c,v 1.32 2011/07/23 14:28:28 hannken Exp $"); +__KERNEL_RCSID(0, "$NetBSD: putter.c,v 1.33 2012/07/26 10:13:33 yamt Exp $"); #include #include @@ -392,6 +392,11 @@ putter_fop_close(file_t *fp) mutex_exit(&pi_mtx); /* hmm? suspicious locking? */ + if (pi->pi_curput != NULL) { + pi->pi_pop->pop_releaseout(pi->pi_private, pi->pi_curopaq, + ENXIO); + pi->pi_curput = NULL; + } while ((rv = pi->pi_pop->pop_close(pi->pi_private)) == ERESTART) goto restart;