diff options
author | cinap_lenrek <cinap_lenrek@localhost> | 2011-06-16 20:04:43 +0200 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@localhost> | 2011-06-16 20:04:43 +0200 |
commit | 19fda05a6dbf5f7529a42a6028b8a0f45c237a8b (patch) | |
tree | 32c0261d5ebd7cd9d3aa6b5fc25280a057a1f9c0 /sys/src | |
parent | 158b5a3a219fde6c353a46a2c1170176a64959ce (diff) |
9660srv: fix memory leak
Diffstat (limited to 'sys/src')
-rw-r--r-- | sys/src/cmd/9660srv/main.c | 5 |
1 files changed, 3 insertions, 2 deletions
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; |