diff options
author | zml <zml@FreeBSD.org> | 2009-05-27 17:01:59 +0000 |
---|---|---|
committer | zml <zml@FreeBSD.org> | 2009-05-27 17:01:59 +0000 |
commit | b186e91180da0abaa602da3390c0d96d447be697 (patch) | |
tree | 6403b1bf47bfbee168f1e1cc5d5d827f9e381c29 /lib/libc/include | |
parent | f9be7478fe74c8b453240e0182928d5dce69b5b9 (diff) | |
download | FreeBSD-src-b186e91180da0abaa602da3390c0d96d447be697.zip FreeBSD-src-b186e91180da0abaa602da3390c0d96d447be697.tar.gz |
Fix an issue when nss fallback routines are used in a multithreaded application.
Reviewed by: bushman
Approved by: dfr (mentor)
Diffstat (limited to 'lib/libc/include')
-rw-r--r-- | lib/libc/include/nss_tls.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/libc/include/nss_tls.h b/lib/libc/include/nss_tls.h index 13ab367..6253ec6 100644 --- a/lib/libc/include/nss_tls.h +++ b/lib/libc/include/nss_tls.h @@ -67,6 +67,7 @@ name##_getstate(struct name##_state **p) \ *p = calloc(1, sizeof(**p)); \ if (*p == NULL) \ return (ENOMEM); \ + memset(*p, 0, sizeof(**p)); \ rv = _pthread_setspecific(name##_state_key, *p); \ if (rv != 0) { \ free(*p); \ |