loader: provide values in help_getnext()
With r328289 we attempt to make sure we free the resources allocated in help_getnext(), however, it is possible that we get no resources allocated and help_getnext() will return early. Make sure we have pointers set to NULL early in help_getnext(). Reported by: Andy Fiddaman
This commit is contained in:
parent
3877c32ec9
commit
5276f60430
@ -64,7 +64,9 @@ static int
|
||||
help_getnext(int fd, char **topic, char **subtopic, char **desc)
|
||||
{
|
||||
char line[81], *cp, *ep;
|
||||
|
||||
|
||||
/* Make sure we provide sane values. */
|
||||
*topic = *subtopic = *desc = NULL;
|
||||
for (;;) {
|
||||
if (fgetstr(line, 80, fd) < 0)
|
||||
return(0);
|
||||
|
Loading…
x
Reference in New Issue
Block a user