This is the mail archive of the 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]

Fix for inet_ntoa.c

Dylan reported a bug with mtrace:
$ cat pr2477.c
int main() {
        printf("%s\n", inet_ntoa(0x12345678));
gee:~/tmp:[0]$ MALLOC_TRACE=mtrace.out ./a.out
Segmentation fault

Since we use in inet_ntoa now thread specific memory static_buf is
never dynamically allocated and therefore should not be freed.

Ok to commit?


2001-08-14  Andreas Jaeger  <>

	* inet/inet_ntoa.c (free_mem): Remove, it's not used anymore.
	Closes PR libc/2477, reported by Dylan Alex Simon

--- inet/inet_ntoa.c.~1~	Fri Jul  6 18:23:36 2001
+++ inet/inet_ntoa.c	Tue Aug 14 13:30:51 2001
@@ -1,5 +1,5 @@
 /* Convert Inet number to ASCII representation.
-   Copyright (C) 1997, 1998, 2000 Free Software Foundation, Inc.
+   Copyright (C) 1997, 1998, 2000, 2001 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <>, 1997.
@@ -96,11 +96,3 @@
   free (mem);
   __libc_setspecific (key, NULL);
-static void __attribute__ ((unused))
-free_mem (void)
-  free (static_buf);
-text_set_element (__libc_subfreeres, free_mem);

 Andreas Jaeger
  SuSE Labs

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