summaryrefslogtreecommitdiffstats
path: root/lib/libc/nls
diff options
context:
space:
mode:
authorphantom <phantom@FreeBSD.org>2000-09-01 11:56:31 +0000
committerphantom <phantom@FreeBSD.org>2000-09-01 11:56:31 +0000
commit3fd2030fc48edebae9203e4245f795543e5cbb66 (patch)
tree9d193f39f39a99f0fbb74215bf53a3fe48bcbc0e /lib/libc/nls
parent8ac9a8d4cd024ace6052923c706acb19c53efab7 (diff)
downloadFreeBSD-src-3fd2030fc48edebae9203e4245f795543e5cbb66.zip
FreeBSD-src-3fd2030fc48edebae9203e4245f795543e5cbb66.tar.gz
Fix memory leak introduced by kris in rev 1.22
Diffstat (limited to 'lib/libc/nls')
-rw-r--r--lib/libc/nls/msgcat.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/libc/nls/msgcat.c b/lib/libc/nls/msgcat.c
index f02af8e..ebbac70 100644
--- a/lib/libc/nls/msgcat.c
+++ b/lib/libc/nls/msgcat.c
@@ -134,6 +134,7 @@ int type;
if (*(nlspath + 1) == 'L') {
++nlspath;
if (strlcpy(pathP, lang, spcleft) >= spcleft) {
+ free(base);
errno = ENAMETOOLONG;
return(NLERR);
}
@@ -141,6 +142,7 @@ int type;
} else if (*(nlspath + 1) == 'N') {
++nlspath;
if (strlcpy(pathP, name, spcleft) >= spcleft) {
+ free(base);
errno = ENAMETOOLONG;
return(NLERR);
}
OpenPOWER on IntegriCloud