Fix memory leak introduced by kris in rev 1.22
This commit is contained in:
parent
8ac9a8d4cd
commit
3fd2030fc4
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user