merge r877: plug hypothetical memory leak
git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/branches/nooath@897 185d5e19-27fe-0310-9dcf-9bff6b9f3609
This commit is contained in:
parent
204469e6c6
commit
9ce6a3fc2c
|
@ -79,6 +79,7 @@ openpam_readlinev(FILE *f, int *lineno, int *lenp)
|
|||
/* insert our word */
|
||||
wordv[wordvlen++] = word;
|
||||
wordv[wordvlen] = NULL;
|
||||
word = NULL;
|
||||
}
|
||||
if (errno != 0) {
|
||||
/* I/O error or out of memory */
|
||||
|
@ -86,6 +87,7 @@ openpam_readlinev(FILE *f, int *lineno, int *lenp)
|
|||
while (wordvlen--)
|
||||
free(wordv[wordvlen]);
|
||||
free(wordv);
|
||||
free(word);
|
||||
errno = serrno;
|
||||
return (NULL);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue