about summary refs log tree commit diff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2003-06-10 07:45:18 +0000
committerUlrich Drepper <drepper@redhat.com>2003-06-10 07:45:18 +0000
commit06120d793a3ae31f8f510f220c8a0a8e23b6a177 (patch)
treee575c19a14531eb7ffbdc3d91e2afd605c21d11b
parent54c924656eb5f55b7a6e95bf6c31b6f3bc1e09dc (diff)
downloadglibc-06120d793a3ae31f8f510f220c8a0a8e23b6a177.tar.gz
glibc-06120d793a3ae31f8f510f220c8a0a8e23b6a177.tar.xz
glibc-06120d793a3ae31f8f510f220c8a0a8e23b6a177.zip
Update.
2003-06-10  Ulrich Drepper  <drepper@redhat.com>

	* sysdeps/posix/getaddrinfo.c (getaddrinfo): Don't leak memory
	from getifaddr calls.
-rw-r--r--ChangeLog5
-rw-r--r--nptl/ChangeLog6
-rw-r--r--nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S7
-rw-r--r--sysdeps/posix/getaddrinfo.c11
4 files changed, 18 insertions, 11 deletions
diff --git a/ChangeLog b/ChangeLog
index 793f47af88..844f522831 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2003-06-10  Ulrich Drepper  <drepper@redhat.com>
+
+	* sysdeps/posix/getaddrinfo.c (getaddrinfo): Don't leak memory
+	from getifaddr calls.
+
 2003-06-09  Jakub Jelinek  <jakub@redhat.com>
 
 	* sysdeps/unix/sysv/linux/kernel-features.h
diff --git a/nptl/ChangeLog b/nptl/ChangeLog
index c0b54e0cdd..34bf9446e4 100644
--- a/nptl/ChangeLog
+++ b/nptl/ChangeLog
@@ -1,3 +1,9 @@
+2003-06-10  Ulrich Drepper  <drepper@redhat.com>
+
+	* sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
+	(__pthread_cond_signal): Remove incorrect second addition for
+	cond_lock!=0.
+
 2003-06-09  Ulrich Drepper  <drepper@redhat.com>
 
 	* sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
diff --git a/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S b/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
index 411a05c9e0..95f3aad1d8 100644
--- a/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
+++ b/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
@@ -116,12 +116,7 @@ __pthread_cond_signal:
 	jmp	2b
 
 	/* Unlock in loop requires wakeup.  */
-5:
-#if cond_lock == 0
-	movl	%edi, %eax
-#else
-	leal	cond_lock(%edi), %eax
-#endif
+5:	movl	%edi, %eax
 	call	__lll_mutex_unlock_wake
 	jmp	6b
 
diff --git a/sysdeps/posix/getaddrinfo.c b/sysdeps/posix/getaddrinfo.c
index 062d10849d..23f7122ae1 100644
--- a/sysdeps/posix/getaddrinfo.c
+++ b/sysdeps/posix/getaddrinfo.c
@@ -930,7 +930,7 @@ getaddrinfo (const char *name, const char *service,
 	 XXX We are using getifaddrs here which is more costly than
 	 it is really necessary.  Once things are stable we will have
 	 a special function which performs the task with less overhead.  */
-      struct ifaddrs* ifa = NULL;
+      struct ifaddrs *ifa = NULL;
 
       if (getifaddrs (&ifa) != 0)
 	/* Cannot get the interface list, very bad.  */
@@ -939,14 +939,15 @@ getaddrinfo (const char *name, const char *service,
       bool seen_ipv4 = false;
       bool seen_ipv6 = false;
 
-      while (ifa != NULL)
+      struct ifaddrs *runp = ifa;
+      while (runp != NULL)
 	{
-	  if (ifa->ifa_addr->sa_family == PF_INET)
+	  if (runp->ifa_addr->sa_family == PF_INET)
 	    seen_ipv4 = true;
-	  else if (ifa->ifa_addr->sa_family == PF_INET6)
+	  else if (runp->ifa_addr->sa_family == PF_INET6)
 	    seen_ipv6 = true;
 
-	  ifa = ifa->ifa_next;
+	  runp = runp->ifa_next;
 	}
 
       (void) freeifaddrs (ifa);