mirror of
https://github.com/isc-projects/bind9.git
synced 2026-06-12 17:59:59 -04:00
Cleanup in journal_open() correctly (#41129)
(cherry picked from commit 65f6e2f909)
This commit is contained in:
parent
dd2b5cf45b
commit
264d7653dd
1 changed files with 5 additions and 4 deletions
|
|
@ -678,11 +678,12 @@ journal_open(isc_mem_t *mctx, const char *filename, isc_boolean_t writable,
|
|||
|
||||
failure:
|
||||
j->magic = 0;
|
||||
if (j->index != NULL) {
|
||||
isc_mem_put(j->mctx, j->index, j->header.index_size *
|
||||
if (j->rawindex != NULL)
|
||||
isc_mem_put(j->mctx, j->rawindex, j->header.index_size *
|
||||
sizeof(journal_rawpos_t));
|
||||
j->index = NULL;
|
||||
}
|
||||
if (j->index != NULL)
|
||||
isc_mem_put(j->mctx, j->index, j->header.index_size *
|
||||
sizeof(journal_pos_t));
|
||||
if (j->filename != NULL)
|
||||
isc_mem_free(j->mctx, j->filename);
|
||||
if (j->fp != NULL)
|
||||
|
|
|
|||
Loading…
Reference in a new issue