about summary refs log tree commit diff
path: root/sysdeps/posix/getaddrinfo.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@gmail.com>2011-06-13 08:31:50 -0400
committerUlrich Drepper <drepper@gmail.com>2011-06-13 08:31:50 -0400
commit3154bfb8c7fb84fbf7ecdc787752b395579d2ac7 (patch)
tree0ce724ea5342a163b6bfb934803743abbbe40573 /sysdeps/posix/getaddrinfo.c
parentdecd4e50b6faa6b148fe7ef99536ba9f95183a00 (diff)
downloadglibc-3154bfb8c7fb84fbf7ecdc787752b395579d2ac7.tar.gz
glibc-3154bfb8c7fb84fbf7ecdc787752b395579d2ac7.tar.xz
glibc-3154bfb8c7fb84fbf7ecdc787752b395579d2ac7.zip
Fix memory leak in getaddrinfo
Diffstat (limited to 'sysdeps/posix/getaddrinfo.c')
-rw-r--r--sysdeps/posix/getaddrinfo.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sysdeps/posix/getaddrinfo.c b/sysdeps/posix/getaddrinfo.c
index 1e017b2ed6..469abe22de 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
 	    {