summaryrefslogtreecommitdiff
path: root/journal.c
diff options
context:
space:
mode:
authorDavid Vazgenovich Shakaryan <dvshakaryan@gmail.com>2018-09-17 01:49:31 -0700
committerDavid Vazgenovich Shakaryan <dvshakaryan@gmail.com>2018-09-17 01:49:31 -0700
commit101cb879ba853eabf714020eb09f138bc58c8c9c (patch)
tree1157557549a864293fef04dab9a27cb7bd0a99af /journal.c
parentf78ea4fbe6aefe35afb1df66348f613c7e207c46 (diff)
downloadjournal-101cb879ba853eabf714020eb09f138bc58c8c9c.tar.gz
journal-101cb879ba853eabf714020eb09f138bc58c8c9c.tar.xz
free path string after opening file
Diffstat (limited to 'journal.c')
-rw-r--r--journal.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/journal.c b/journal.c
index 39354fd..c7bd9ba 100644
--- a/journal.c
+++ b/journal.c
@@ -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];