diff options
author | bdrewery <bdrewery@FreeBSD.org> | 2015-02-10 20:45:40 +0000 |
---|---|---|
committer | bdrewery <bdrewery@FreeBSD.org> | 2015-02-10 20:45:40 +0000 |
commit | ff61e3f5d6f0b7f2178043ac7fb5a4ee552e67b4 (patch) | |
tree | 9c7d26d555c268f9cb1c2949fc50220fbc24b0c1 /lib | |
parent | b9be305241681da7846cc34819d953dd56af8657 (diff) | |
download | FreeBSD-src-ff61e3f5d6f0b7f2178043ac7fb5a4ee552e67b4.zip FreeBSD-src-ff61e3f5d6f0b7f2178043ac7fb5a4ee552e67b4.tar.gz |
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. There is work in progress to support
freeing the cache which requires this change to avoid a memory leak.
MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libc/nls/msgcat.c | 1 |
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; \ |