Fix double free when i/o descriptor is violently closed. Bug was

introduced in rev 1.27.

fix provided by Taylor R Campbell in lib/39353
This commit is contained in:
pooka 2008-09-04 15:30:36 +00:00
parent ae69aebaca
commit 1acae5309f
1 changed files with 2 additions and 6 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: framebuf.c,v 1.28 2008/01/29 10:07:29 pooka Exp $ */
/* $NetBSD: framebuf.c,v 1.29 2008/09/04 15:30:36 pooka Exp $ */
/*
* Copyright (c) 2007 Antti Kantee. All Rights Reserved.
@ -35,7 +35,7 @@
#include <sys/cdefs.h>
#if !defined(lint)
__RCSID("$NetBSD: framebuf.c,v 1.28 2008/01/29 10:07:29 pooka Exp $");
__RCSID("$NetBSD: framebuf.c,v 1.29 2008/09/04 15:30:36 pooka Exp $");
#endif /* !lint */
#include <sys/types.h>
@ -680,10 +680,6 @@ puffs__framev_input(struct puffs_usermount *pu, struct puffs_framectrl *fctrl,
if (rv) {
puffs__framev_readclose(pu, fio, rv);
fio->cur_in = NULL;
if ((pufbuf->istat & ISTAT_DIRECT) == 0) {
assert((pufbuf->istat & ISTAT_NODESTROY) == 0);
puffs_framebuf_destroy(pufbuf);
}
return;
}