From b746cfb8d45d2a4b15b9955c5cb79cf42c3e9b3d Mon Sep 17 00:00:00 2001 From: pjd Date: Wed, 22 Mar 2006 00:42:41 +0000 Subject: [PATCH] Destroy "bip" bio in error case. Found by: Coverity Prevent analysis tool Coverity ID: 795 MFC after: 3 days --- sys/kern/vfs_bio.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c index e3780e376798..e837cbb6e914 100644 --- a/sys/kern/vfs_bio.c +++ b/sys/kern/vfs_bio.c @@ -3065,6 +3065,7 @@ dev_strategy(struct cdev *dev, struct buf *bp) devtoname(dev))); csw = dev_refthread(dev); if (csw == NULL) { + g_destroy_bio(bip); bp->b_error = ENXIO; bp->b_ioflags = BIO_ERROR; bufdone(bp);