diff --git a/sys/src/cmd/9660srv/main.c b/sys/src/cmd/9660srv/main.c index 400449297..9d9541f4f 100644 --- a/sys/src/cmd/9660srv/main.c +++ b/sys/src/cmd/9660srv/main.c @@ -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;