Skip to content
Snippets Groups Projects
Commit 2a223942 authored by Libor Peltan's avatar Libor Peltan
Browse files

Fix up cd928cf9 : minor resource leak

parent 8601f8d1
Branches
Tags
No related merge requests found
......@@ -61,12 +61,14 @@ int print_journal(char *path, knot_dname_t *name, uint32_t limit, bool color)
journal_t *journal = NULL;
int ret = journal_open(&journal, path, ~((size_t)0));
if (ret != KNOT_EOK) {
free(buff);
return ret;
}
// Load changesets from journal.
if (journal->qtail == journal->qhead) {
journal_close(journal);
free(buff);
return KNOT_ENOENT;
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment