diff options
author | rsc <devnull@localhost> | 2006-10-19 21:58:59 +0000 |
---|---|---|
committer | rsc <devnull@localhost> | 2006-10-19 21:58:59 +0000 |
commit | 6fc7da3c529ca7c610e8172f5b02980c75597dd5 (patch) | |
tree | 6e06f1a96414ceb59a8016fb257b46b6f87f9a1c /src/libventi/file.c | |
parent | 067d852abe242ee1d267bcc0d652cd6bb31b7e17 (diff) | |
download | plan9port-6fc7da3c529ca7c610e8172f5b02980c75597dd5.tar.gz plan9port-6fc7da3c529ca7c610e8172f5b02980c75597dd5.tar.bz2 plan9port-6fc7da3c529ca7c610e8172f5b02980c75597dd5.zip |
Fix a handful of small one-time memory leaks in vbackup,
and one per-package memory leak (in writethread).
Diffstat (limited to 'src/libventi/file.c')
-rw-r--r-- | src/libventi/file.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/libventi/file.c b/src/libventi/file.c index 174561ec..6604ef67 100644 --- a/src/libventi/file.c +++ b/src/libventi/file.c @@ -699,7 +699,7 @@ vtfileblock(VtFile *r, u32int bn, int mode) i = mkindices(&e, bn, index); if(i < 0) - return nil; + goto Err; if(i > DEPTH(e.type)){ if(mode == VtOREAD){ werrstr("bad address 0x%lux", (ulong)bn); @@ -726,6 +726,7 @@ assert(b->type == VtDirType); vtblockput(b); b = bb; } + b->pc = getcallerpc(&r); return b; Err: vtblockput(b); @@ -833,6 +834,7 @@ fileloadblock(VtFile *r, int mode) b = vtcacheglobal(r->c, r->score, VtDirType); if(b == nil) return nil; + b->pc = getcallerpc(&r); return b; } assert(r->parent != nil); @@ -902,6 +904,7 @@ vtfilelock(VtFile *r, int mode) */ assert(r->b == nil); r->b = b; + b->pc = getcallerpc(&r); return 0; } @@ -948,6 +951,8 @@ vtfilelock2(VtFile *r, VtFile *rr, int mode) */ r->b = b; rr->b = bb; + b->pc = getcallerpc(&r); + bb->pc = getcallerpc(&r); return 0; } |