mirror of
https://github.com/isc-projects/bind9.git
synced 2026-02-26 19:41:04 -05:00
Silence CID 329157: Dereference before null check in lib/dns/journal.c
*** CID 329157: Null pointer dereferences (REVERSE_INULL)
/lib/dns/journal.c: 754 in journal_open()
748 j->header.index_size * sizeof(journal_rawpos_t));
749 }
750 if (j->index != NULL) {
751 isc_mem_put(j->mctx, j->index,
752 j->header.index_size * sizeof(journal_pos_t));
753 }
CID 329157: Null pointer dereferences (REVERSE_INULL)
Null-checking "j->filename" suggests that it may be null, but it has already been dereferenced on all paths leading to the check.
754 if (j->filename != NULL) {
755 isc_mem_free(j->mctx, j->filename);
756 }
757 if (j->fp != NULL) {
758 (void)isc_stdio_close(j->fp);
759 }
(cherry picked from commit 4054405909)
This commit is contained in:
parent
ccb21b3f79
commit
fb7e38cca2
1 changed files with 1 additions and 3 deletions
|
|
@ -751,9 +751,7 @@ failure:
|
|||
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);
|
||||
}
|
||||
isc_mem_free(j->mctx, j->filename);
|
||||
if (j->fp != NULL) {
|
||||
(void)isc_stdio_close(j->fp);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue