We should only free the buffer when done reading the dir.

This commit is contained in:
Roy Marples 2008-03-21 08:31:04 +00:00
parent e47661449a
commit e505e6ea41

View File

@ -553,7 +553,6 @@ bool rc_service_daemons_crashed(const char *service)
break;
}
}
free(line);
fclose(fp);
pid = 0;
@ -621,6 +620,7 @@ bool rc_service_daemons_crashed(const char *service)
break;
}
closedir(dp);
free(line);
return retval;
}