CID 464884: Null pointer dereference in bin/tests/system/dyndb/driver/db.c
Coverity Scan detected the following issue in bin/tests/system/dyndb/driver/db.c
.
It's either something new, or Coverity Scan got interested in bin/tests/system/dyndb/driver/db.c
because it was changed in 1d341096.
/bin/tests/system/dyndb/driver/db.c: 644 in create_db()
638
639 *dbp = (dns_db_t *)sampledb;
640
641 return (ISC_R_SUCCESS);
642
643 cleanup:
>>> CID 464884: Null pointer dereferences (REVERSE_INULL)
>>> Null-checking "sampledb" suggests that it may be null, but it has already been dereferenced on all paths leading to the check.
644 if (sampledb != NULL) {
645 if (dns_name_dynamic(&sampledb->common.origin)) {
646 dns_name_free(&sampledb->common.origin, mctx);
647 }
648
649 isc_mem_putanddetach(&sampledb->common.mctx, sampledb,