Fix memory leak introduced by kris in rev 1.22

This commit is contained in:
Alexey Zelkin 2000-09-01 11:56:31 +00:00
parent d85a56345e
commit a367b9700f
1 changed files with 2 additions and 0 deletions

View File

@ -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);
}