From d8bbc515669e38690ddd6d07fbdaa90062e823ce Mon Sep 17 00:00:00 2001 From: chs Date: Sun, 3 Jun 2001 16:49:07 +0000 Subject: [PATCH] fix an error case for quotas. --- sys/ufs/ffs/ffs_alloc.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/ufs/ffs/ffs_alloc.c b/sys/ufs/ffs/ffs_alloc.c index 552423f4febd..619d609b6d48 100644 --- a/sys/ufs/ffs/ffs_alloc.c +++ b/sys/ufs/ffs/ffs_alloc.c @@ -1,4 +1,4 @@ -/* $NetBSD: ffs_alloc.c,v 1.43 2001/05/30 11:57:17 mrg Exp $ */ +/* $NetBSD: ffs_alloc.c,v 1.44 2001/06/03 16:49:07 chs Exp $ */ /* * Copyright (c) 1982, 1986, 1989, 1993 @@ -249,7 +249,9 @@ ffs_realloccg(ip, lbprev, bpref, osize, nsize, cred, bpp, blknop) } #ifdef QUOTA if ((error = chkdq(ip, (long)btodb(nsize - osize), cred, 0)) != 0) { - brelse(bp); + if (bpp != NULL) { + brelse(bp); + } return (error); } #endif