This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: I: [PATCH] realloc-related memory leaks fixes


"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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]