mirror of
https://github.com/isc-projects/bind9.git
synced 2026-06-11 04:30:00 -04:00
'dctx' must be non NULL, remove test.
1549 cleanup: 1550 if (dctx->dbiter != NULL) 1551 dns_dbiterator_destroy(&dctx->dbiter); 1552 if (dctx->db != NULL) 1553 dns_db_detach(&dctx->db); CID 1452686 (#1 of 1): Dereference before null check (REVERSE_INULL) check_after_deref: Null-checking dctx suggests that it may be null, but it has already been dereferenced on all paths leading to the check. 1554 if (dctx != NULL) 1555 isc_mem_put(mctx, dctx, sizeof(*dctx));
This commit is contained in:
parent
bf7a99a3c1
commit
fccf65a585
1 changed files with 5 additions and 4 deletions
|
|
@ -1547,12 +1547,13 @@ dumpctx_create(isc_mem_t *mctx, dns_db_t *db, dns_dbversion_t *version,
|
|||
return (ISC_R_SUCCESS);
|
||||
|
||||
cleanup:
|
||||
if (dctx->dbiter != NULL)
|
||||
if (dctx->dbiter != NULL) {
|
||||
dns_dbiterator_destroy(&dctx->dbiter);
|
||||
if (dctx->db != NULL)
|
||||
}
|
||||
if (dctx->db != NULL) {
|
||||
dns_db_detach(&dctx->db);
|
||||
if (dctx != NULL)
|
||||
isc_mem_put(mctx, dctx, sizeof(*dctx));
|
||||
}
|
||||
isc_mem_put(mctx, dctx, sizeof(*dctx));
|
||||
return (result);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue