mirror of
https://sourceware.org/git/glibc.git
synced 2025-01-03 00:10:10 +00:00
Update.
2003-06-10 Ulrich Drepper <drepper@redhat.com> * sysdeps/posix/getaddrinfo.c (getaddrinfo): Don't leak memory from getifaddr calls.
This commit is contained in:
parent
54c924656e
commit
06120d793a
@ -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>
|
2003-06-09 Jakub Jelinek <jakub@redhat.com>
|
||||||
|
|
||||||
* sysdeps/unix/sysv/linux/kernel-features.h
|
* sysdeps/unix/sysv/linux/kernel-features.h
|
||||||
|
@ -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>
|
2003-06-09 Ulrich Drepper <drepper@redhat.com>
|
||||||
|
|
||||||
* sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
|
* sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
|
||||||
|
@ -116,12 +116,7 @@ __pthread_cond_signal:
|
|||||||
jmp 2b
|
jmp 2b
|
||||||
|
|
||||||
/* Unlock in loop requires wakeup. */
|
/* Unlock in loop requires wakeup. */
|
||||||
5:
|
5: movl %edi, %eax
|
||||||
#if cond_lock == 0
|
|
||||||
movl %edi, %eax
|
|
||||||
#else
|
|
||||||
leal cond_lock(%edi), %eax
|
|
||||||
#endif
|
|
||||||
call __lll_mutex_unlock_wake
|
call __lll_mutex_unlock_wake
|
||||||
jmp 6b
|
jmp 6b
|
||||||
|
|
||||||
|
@ -930,7 +930,7 @@ getaddrinfo (const char *name, const char *service,
|
|||||||
XXX We are using getifaddrs here which is more costly than
|
XXX We are using getifaddrs here which is more costly than
|
||||||
it is really necessary. Once things are stable we will have
|
it is really necessary. Once things are stable we will have
|
||||||
a special function which performs the task with less overhead. */
|
a special function which performs the task with less overhead. */
|
||||||
struct ifaddrs* ifa = NULL;
|
struct ifaddrs *ifa = NULL;
|
||||||
|
|
||||||
if (getifaddrs (&ifa) != 0)
|
if (getifaddrs (&ifa) != 0)
|
||||||
/* Cannot get the interface list, very bad. */
|
/* Cannot get the interface list, very bad. */
|
||||||
@ -939,14 +939,15 @@ getaddrinfo (const char *name, const char *service,
|
|||||||
bool seen_ipv4 = false;
|
bool seen_ipv4 = false;
|
||||||
bool seen_ipv6 = 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;
|
seen_ipv4 = true;
|
||||||
else if (ifa->ifa_addr->sa_family == PF_INET6)
|
else if (runp->ifa_addr->sa_family == PF_INET6)
|
||||||
seen_ipv6 = true;
|
seen_ipv6 = true;
|
||||||
|
|
||||||
ifa = ifa->ifa_next;
|
runp = runp->ifa_next;
|
||||||
}
|
}
|
||||||
|
|
||||||
(void) freeifaddrs (ifa);
|
(void) freeifaddrs (ifa);
|
||||||
|
Loading…
Reference in New Issue
Block a user