]> Devi Nivas Git - cs3210-lab0.git/commitdiff
free the indirect block
authorkolya <kolya>
Thu, 16 Oct 2008 15:00:23 +0000 (15:00 +0000)
committerkolya <kolya>
Thu, 16 Oct 2008 15:00:23 +0000 (15:00 +0000)
fs.c

diff --git a/fs.c b/fs.c
index 63e3e40ddadbe7c389635fcfb86c33bc3d9d3f0e..70c7ec1983a42465d03bda32034c3c1f6a08aaf2 100644 (file)
--- a/fs.c
+++ b/fs.c
@@ -381,6 +381,7 @@ itrunc(struct inode *ip)
         bfree(ip->dev, a[j]);
     }
     brelse(bp);
+    bfree(ip->dev, ip->addrs[INDIRECT]);
     ip->addrs[INDIRECT] = 0;
   }