extra assertion, fix leak in vtread

This commit is contained in:
rsc 2004-06-16 03:12:39 +00:00
parent d3232caf63
commit c5eb686096
2 changed files with 3 additions and 0 deletions

View file

@ -98,6 +98,7 @@ vtread(VtConn *z, uchar score[VtScoreSize], uint type, uchar *buf, int n)
nn = packetsize(p);
if(packetconsume(p, buf, nn) < 0)
abort();
packetfree(p);
return nn;
}

View file

@ -190,6 +190,8 @@ vtfilecreate(VtFile *r, int psize, int dsize, int dir)
u32int offset;
assert(ISLOCKED(r));
assert(psize <= VtMaxLumpSize);
assert(dsize <= VtMaxLumpSize);
if(!r->dir){
werrstr(ENotDir);