aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/vac
diff options
context:
space:
mode:
authorrsc <devnull@localhost>2005-11-21 20:42:52 +0000
committerrsc <devnull@localhost>2005-11-21 20:42:52 +0000
commit9e2f1d9bf4c3ce413953b17fa7605b49322d1ace (patch)
tree0fa8a0b6d60628738c73e20464ae468f34b44b84 /src/cmd/vac
parent86c2ab2caf5eb4742e7cd227e6d29fc1dc74d855 (diff)
downloadplan9port-9e2f1d9bf4c3ce413953b17fa7605b49322d1ace.tar.gz
plan9port-9e2f1d9bf4c3ce413953b17fa7605b49322d1ace.tar.bz2
plan9port-9e2f1d9bf4c3ce413953b17fa7605b49322d1ace.zip
9P2000.u fixes (Lucho Ionkov)
Diffstat (limited to 'src/cmd/vac')
-rw-r--r--src/cmd/vac/vacfs.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/cmd/vac/vacfs.c b/src/cmd/vac/vacfs.c
index b82dee2e..17d0903c 100644
--- a/src/cmd/vac/vacfs.c
+++ b/src/cmd/vac/vacfs.c
@@ -557,7 +557,8 @@ rclunk(Fid *f)
f->open = 0;
vtfree(f->user);
f->user = nil;
- vacfiledecref(f->file);
+ if(f->file)
+ vacfiledecref(f->file);
f->file = nil;
dirBufFree(f->db);
f->db = nil;
@@ -847,7 +848,9 @@ io(void)
if(dflag)
fprint(2, "vacfs:->%F\n", &thdr);
n = convS2Mu(&thdr, mdata, messagesize, dotu);
- if (err)
+ if(n <= BIT16SZ)
+ sysfatal("convS2Mu conversion error");
+ if(err)
vtfree(err);
if(write(mfd[1], mdata, n) != n)