diff options
author | Andreas Schwab <schwab@redhat.com> | 2011-11-15 10:32:18 +0100 |
---|---|---|
committer | Andreas Schwab <schwab@redhat.com> | 2011-11-15 10:58:00 +0100 |
commit | 09f93bd3d6b1c41370432e6b7a3c88d0fc482881 (patch) | |
tree | eb699670ac2ec88fb1ab4bb373e636fc6f8b75d1 /sysdeps/unix/sysv | |
parent | 312be3f9f5eab1643d7dcc7728c76d413d4f2640 (diff) | |
download | glibc-09f93bd3d6b1c41370432e6b7a3c88d0fc482881.tar.gz glibc-09f93bd3d6b1c41370432e6b7a3c88d0fc482881.tar.xz glibc-09f93bd3d6b1c41370432e6b7a3c88d0fc482881.zip |
Fix reference counting in network interface information cache
Diffstat (limited to 'sysdeps/unix/sysv')
-rw-r--r-- | sysdeps/unix/sysv/linux/check_pf.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sysdeps/unix/sysv/linux/check_pf.c b/sysdeps/unix/sysv/linux/check_pf.c index 1f66684e4f..895dc2a285 100644 --- a/sysdeps/unix/sysv/linux/check_pf.c +++ b/sysdeps/unix/sysv/linux/check_pf.c @@ -58,7 +58,7 @@ struct cached_data 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 }; @@ -273,6 +273,7 @@ make_request (int fd, pid_t pid) } else { + atomic_add(&noai6ai_cached.usecnt, 2); noai6ai_cached.seen_ipv4 = seen_ipv4; noai6ai_cached.seen_ipv6 = seen_ipv6; result = &noai6ai_cached; |