All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH hail] chunkd: don't leak an FS object iterator
@ 2010-09-29 15:20 Jim Meyering
  2010-09-30 18:44 ` Jeff Garzik
  2010-09-30 18:52 ` Jeff Garzik
  0 siblings, 2 replies; 4+ messages in thread
From: Jim Meyering @ 2010-09-29 15:20 UTC (permalink / raw)
  To: Project Hail; +Cc: Pete Zaitcev


chk_list_objs called fs_list_objs_open without also calling
fs_list_objs_close.

 32,808 bytes in 1 blocks are definitely lost in loss record 413 of 419
    at 0x4A0515D: malloc (vg_replace_malloc.c:195)
    by 0x31BA8A26D0: __alloc_dir (opendir.c:184)
    by 0x405619: fs_list_objs_open (be-fs.c:974)
    by 0x40B202: chk_list_objs (selfcheck.c:41)
    by 0x40B575: chk_dbscan (selfcheck.c:131)
    by 0x40B628: chk_thread_scan (selfcheck.c:147)
    by 0x40B757: chk_thread_command (selfcheck.c:179)
    by 0x40B890: chk_thread_func (selfcheck.c:219)
    by 0x31BC464E83: g_thread_create_proxy (gthread.c:1893)
    by 0x31BB407760: start_thread (pthread_create.c:301)
    by 0x31BA8E151C: clone (clone.S:115)

Signed-off-by: Jim Meyering <meyering@redhat.com>
---

Thanks to Pete for catching my error.
To make up for that, here's a real leak fix:

 chunkd/selfcheck.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/chunkd/selfcheck.c b/chunkd/selfcheck.c
index f3713da..86d3eb2 100644
--- a/chunkd/selfcheck.c
+++ b/chunkd/selfcheck.c
@@ -100,6 +100,7 @@ static void chk_list_objs(struct chk_tls *tls, uint32_t table_id)

 		free(fn);
 	}
+	fs_list_objs_close(&lister);
 }

 static void chk_dbscan(struct chk_tls *tls)
--
1.7.3.293.gca9a76

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-10-03  7:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-29 15:20 [PATCH hail] chunkd: don't leak an FS object iterator Jim Meyering
2010-09-30 18:44 ` Jeff Garzik
2010-10-03  7:00   ` Jim Meyering
2010-09-30 18:52 ` Jeff Garzik

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.