commit 52e34db194b46210035a263d96e19da107a5281a
parent b5a2d4dae76817f8e206d32302206a8a7ababc46
Author: Russ Cox <rsc@swtch.com>
Date: Sat, 6 Dec 2008 14:45:57 -0800
vac: error handling bug in vacfileblockscore (David Swasey)
Diffstat:
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/cmd/vac/file.c b/src/cmd/vac/file.c
@@ -598,11 +598,12 @@ vacfileblockscore(VacFile *f, u32int bn, u8int *score)
dsize = s->dsize;
size = vtfilegetsize(s);
if((uvlong)bn*dsize >= size)
- goto out;
+ goto out1;
ret = vtfileblockscore(f->source, bn, score);
-out:
+out1:
vtfileunlock(f->source);
+out:
filerunlock(f);
return ret;
}