diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/stdlib/files.c | 1 | ||||
| -rw-r--r-- | src/stdlib/paths.c | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/src/stdlib/files.c b/src/stdlib/files.c index 88d78676..b0545420 100644 --- a/src/stdlib/files.c +++ b/src/stdlib/files.c @@ -116,6 +116,7 @@ static file_t *_load_file(const char *filename, FILE *file) { ret->relative_filename = &filename[cwd_len + 1]; } } + if (line_buf != NULL) free(line_buf); return ret; } diff --git a/src/stdlib/paths.c b/src/stdlib/paths.c index 73f62975..810f98b1 100644 --- a/src/stdlib/paths.c +++ b/src/stdlib/paths.c @@ -662,6 +662,7 @@ static Text_t _next_line(FILE **f) { next_line:; ssize_t len = getline(&line, &size, *f); if (len <= 0) { + if (line != NULL) free(line); _line_reader_cleanup(f); return NONE_TEXT; } |
