]> git.pld-linux.org Git - packages/glibc.git/commitdiff
- fix getaddrinfo memory leak
authorArkadiusz Miśkiewicz <arekm@maven.pl>
Mon, 13 Jun 2011 20:23:05 +0000 (20:23 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    glibc-git.patch -> 1.5

glibc-git.patch

index c0977d9e92b27a5412d8b81f8b01b596cd929763..9bdbda8d6ff762ebda1fd27eeefe802d680726a9 100644 (file)
@@ -97,3 +97,21 @@ index eb7fedc..28fce4f 100644
            return ret.num;
        }
  # endif
+;2011-06-10  Andreas Schwab  <schwab@redhat.com>
+;
+;      * sysdeps/posix/getaddrinfo.c (gaih_inet): Fix logic allocating
+;      tmpbuf.
+;
+diff --git a/sysdeps/posix/getaddrinfo.c b/sysdeps/posix/getaddrinfo.c
+index 1e017b2..469abe2 100644
+--- a/sysdeps/posix/getaddrinfo.c
++++ b/sysdeps/posix/getaddrinfo.c
+@@ -821,7 +821,7 @@ gaih_inet (const char *name, const struct gaih_service *service,
+         size_t tmpbuflen = 1024;
+         malloc_tmpbuf = !__libc_use_alloca (alloca_used + tmpbuflen);
+         assert (tmpbuf == NULL);
+-        if (malloc_tmpbuf)
++        if (!malloc_tmpbuf)
+           tmpbuf = alloca_account (tmpbuflen, alloca_used);
+         else
+           {
This page took 0.041217 seconds and 4 git commands to generate.