This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA/commit/procfs] /proc/.../map file descriptor leak
- From: Tom Tromey <tromey at redhat dot com>
- To: Joel Brobecker <brobecker at adacore dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Wed, 09 Nov 2011 12:06:12 -0700
- Subject: Re: [RFA/commit/procfs] /proc/.../map file descriptor leak
- References: <1320864439-12456-1-git-send-email-brobecker@adacore.com>
>>>>> "Joel" == Joel Brobecker <brobecker@adacore.com> writes:
Joel> Digging further, I found that we leak the file descriptor created
Joel> when opening the procfs map file. we create a cleanup routine to make
Joel> sure that the associated file descriptor gets closed, but we never
Joel> call the cleanup.
This tickled a memory:
http://sourceware.org/ml/gdb-patches/2008-10/msg00683.html
I didn't touch iterate_over_mappings though, so the old patch is
complementary.
I think your patch is good. I agree it is cleaner the way you wrote it.
Tom