9660srv: fix memory leak
parent
158b5a3a21
commit
19fda05a6d
|
@ -246,6 +246,7 @@ ealloc(long n)
|
|||
p = malloc(n);
|
||||
if(p == 0)
|
||||
error("no memory");
|
||||
setmalloctag(p, getcallerpc(&n));
|
||||
return p;
|
||||
}
|
||||
|
||||
|
@ -365,8 +366,6 @@ rwalk(void)
|
|||
}
|
||||
|
||||
if(waserror()){
|
||||
if(nf != nil)
|
||||
xfile(req->newfid, Clunk);
|
||||
if(rep->nwqid == req->nwname){
|
||||
if(oldlen)
|
||||
free(oldptr);
|
||||
|
@ -378,6 +377,8 @@ rwalk(void)
|
|||
f->ptr = oldptr;
|
||||
f->len = oldlen;
|
||||
}
|
||||
if(nf != nil)
|
||||
xfile(req->newfid, Clunk);
|
||||
if(rep->nwqid==req->nwname || rep->nwqid > 0){
|
||||
err_msg[0] = '\0';
|
||||
return;
|
||||
|
|
Loading…
Reference in New Issue