Fix memory leak introduced by kris in rev 1.22
This commit is contained in:
parent
d85a56345e
commit
a367b9700f
|
@ -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