summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbdrewery <bdrewery@FreeBSD.org>2015-04-03 17:16:05 +0000
committerbdrewery <bdrewery@FreeBSD.org>2015-04-03 17:16:05 +0000
commit302c3103289a81582c33ea23d59170d4e52bec49 (patch)
tree3d0d9dc02d8c63c2d943e65c847cf498d7edd8b3
parentf04ea508f5b9a4d5bc2b70c95b590e1f1ac974ee (diff)
downloadFreeBSD-src-302c3103289a81582c33ea23d59170d4e52bec49.zip
FreeBSD-src-302c3103289a81582c33ea23d59170d4e52bec49.tar.gz
MFC r278530:
When catopen(3) returns an error, it caches the result of that error from r202992. The refcount on the cache entry is not initialized, so any attempt to clean the cache will skip over this item since it likely has a >0 value. This change is currently a NOP.
-rw-r--r--lib/libc/nls/msgcat.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/libc/nls/msgcat.c b/lib/libc/nls/msgcat.c
index 2859916..0cba460 100644
--- a/lib/libc/nls/msgcat.c
+++ b/lib/libc/nls/msgcat.c
@@ -83,6 +83,7 @@ __FBSDID("$FreeBSD$");
np->name = strdup(n); \
np->path = NULL; \
np->catd = NLERR; \
+ np->refcount = 0; \
np->lang = (l == NULL) ? NULL : \
strdup(l); \
np->caterrno = e; \
OpenPOWER on IntegriCloud