9660srv: fix memory leak

cinap_lenrek 2011-06-16 20:04:43 +02:00
parent 158b5a3a21
commit 19fda05a6d
1 changed files with 3 additions and 2 deletions

View File

@ -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;