tvac: error handling bug in vacfileblockscore (David Swasey) - plan9port - [fork] Plan 9 from user space
(HTM) git clone git://src.adamsgaard.dk/plan9port
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
(DIR) commit 52e34db194b46210035a263d96e19da107a5281a
(DIR) parent b5a2d4dae76817f8e206d32302206a8a7ababc46
(HTM) Author: Russ Cox <rsc@swtch.com>
Date: Sat, 6 Dec 2008 14:45:57 -0800
vac: error handling bug in vacfileblockscore (David Swasey)
Diffstat:
M src/cmd/vac/file.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
---
(DIR) diff --git a/src/cmd/vac/file.c b/src/cmd/vac/file.c
t@@ -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;
}