'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:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user