In cache_create_db, dns_db_setloop should be called on the newly created db only if the database creation succeeded.