core: free lines after reading them

Closes https://github.com/systemd/systemd/issues/11251.
This commit is contained in:
Evgeny Vereshchagin 2018-12-23 15:01:03 +01:00 committed by Yu Watanabe
parent 7da7340afd
commit 7334ade4a7
1 changed files with 1 additions and 1 deletions

View File

@ -3243,11 +3243,11 @@ static int manager_deserialize_one_unit(Manager *m, const char *name, FILE *f, F
}
static int manager_deserialize_units(Manager *m, FILE *f, FDSet *fds) {
_cleanup_free_ char *line = NULL;
const char *unit_name;
int r;
for (;;) {
_cleanup_free_ char *line = NULL;
/* Start marker */
r = read_line(f, LONG_LINE_MAX, &line);
if (r < 0)