This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: I: [PATCH] realloc-related memory leaks fixes
- From: Andreas Jaeger <aj at suse dot de>
- To: libc-alpha at sources dot redhat dot com
- Date: Fri, 28 Dec 2001 17:56:56 +0100
- Subject: Re: I: [PATCH] realloc-related memory leaks fixes
- References: <20011225132421.GA6435@ldv.office.alt-linux.org>
"Dmitry V. Levin" <ldv@alt-linux.org> writes:
> Greetings!
>
> I've reviewed current glibc code for common realloc usage errors.
> Following problems have been found:
>
> - 10 files contains classic memory leaks (patch attached);
Those look fine. Uli, shall I commit them?
> - __argz_add_sep() contains possible memory leak; its semantics differs
> from other argz functions (patch attached);
> - resolv/res_hconf.c seems to have memory leak (possible fix also
> attached);
I don't see a memory leak in res_hconf. Please explain what's wrong. The
function is called only once per program.
> - misc/err.c:convert_and_print() and misc/error.c:error_tail() functions
> contain ugly code filled with memory leaks; it have to be rewritten if
> ever used.
> - nis/* also contains classic memory leaks to be fixed.
> - io/fts.c contains memory leaks; I'd suggest to update code from BSD; for
> example, OpenBSD have these bugs fixed.
Can you send a patch for fts.c, please?
Thanks,
Andreas
--
Andreas Jaeger
SuSE Labs aj@suse.de
private aj@arthur.inka.de
http://www.suse.de/~aj