extra assertion, fix leak in vtread
This commit is contained in:
parent
d3232caf63
commit
c5eb686096
2 changed files with 3 additions and 0 deletions
|
|
@ -98,6 +98,7 @@ vtread(VtConn *z, uchar score[VtScoreSize], uint type, uchar *buf, int n)
|
||||||
nn = packetsize(p);
|
nn = packetsize(p);
|
||||||
if(packetconsume(p, buf, nn) < 0)
|
if(packetconsume(p, buf, nn) < 0)
|
||||||
abort();
|
abort();
|
||||||
|
packetfree(p);
|
||||||
return nn;
|
return nn;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -190,6 +190,8 @@ vtfilecreate(VtFile *r, int psize, int dsize, int dir)
|
||||||
u32int offset;
|
u32int offset;
|
||||||
|
|
||||||
assert(ISLOCKED(r));
|
assert(ISLOCKED(r));
|
||||||
|
assert(psize <= VtMaxLumpSize);
|
||||||
|
assert(dsize <= VtMaxLumpSize);
|
||||||
|
|
||||||
if(!r->dir){
|
if(!r->dir){
|
||||||
werrstr(ENotDir);
|
werrstr(ENotDir);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue