I: [PATCH] realloc-related memory leaks fixes
Andreas Jaeger
aj@suse.de
Fri Dec 28 10:42:00 GMT 2001
"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
More information about the Libc-alpha
mailing list