diff options
author | David Vazgenovich Shakaryan <dvshakaryan@gmail.com> | 2018-09-17 01:49:31 -0700 |
---|---|---|
committer | David Vazgenovich Shakaryan <dvshakaryan@gmail.com> | 2018-09-17 01:49:31 -0700 |
commit | 101cb879ba853eabf714020eb09f138bc58c8c9c (patch) | |
tree | 1157557549a864293fef04dab9a27cb7bd0a99af /journal.c | |
parent | f78ea4fbe6aefe35afb1df66348f613c7e207c46 (diff) | |
download | journal-101cb879ba853eabf714020eb09f138bc58c8c9c.tar.gz journal-101cb879ba853eabf714020eb09f138bc58c8c9c.tar.xz |
free path string after opening file
Diffstat (limited to 'journal.c')
-rw-r--r-- | journal.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -37,6 +37,7 @@ static void print_entry(char *entry) memcpy(path, ENTRY_DIR"/", sizeof(ENTRY_DIR)); memcpy(path + sizeof(ENTRY_DIR), entry, len); FILE *f = fopen(path, "r"); + free(path); if (!f) return; char date[11]; |