mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-29 11:41:21 +03:00
Fix reference counting in network interface information cache
This commit is contained in:
@ -1,3 +1,8 @@
|
|||||||
|
2011-11-15 Andreas Schwab <schwab@redhat.com>
|
||||||
|
|
||||||
|
* sysdeps/unix/sysv/linux/check_pf.c (make_request): Properly
|
||||||
|
count references to noai6ai_cached.
|
||||||
|
|
||||||
2011-11-15 Ulrich Drepper <drepper@gmail.com>
|
2011-11-15 Ulrich Drepper <drepper@gmail.com>
|
||||||
|
|
||||||
* time/getdate.c (__getdate_r): Set FD_CLOEXEC for given file.
|
* time/getdate.c (__getdate_r): Set FD_CLOEXEC for given file.
|
||||||
|
@ -58,7 +58,7 @@ struct cached_data
|
|||||||
|
|
||||||
static struct cached_data noai6ai_cached =
|
static struct cached_data noai6ai_cached =
|
||||||
{
|
{
|
||||||
.usecnt = 3, /* Make sure we never try to delete this entry. */
|
.usecnt = 1, /* Make sure we never try to delete this entry. */
|
||||||
.in6ailen = 0
|
.in6ailen = 0
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -273,6 +273,7 @@ make_request (int fd, pid_t pid)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
atomic_add(&noai6ai_cached.usecnt, 2);
|
||||||
noai6ai_cached.seen_ipv4 = seen_ipv4;
|
noai6ai_cached.seen_ipv4 = seen_ipv4;
|
||||||
noai6ai_cached.seen_ipv6 = seen_ipv6;
|
noai6ai_cached.seen_ipv6 = seen_ipv6;
|
||||||
result = &noai6ai_cached;
|
result = &noai6ai_cached;
|
||||||
|
Reference in New Issue
Block a user