There should be no way for it to fail here since we iterate on known
domains, but better safe than sorry.
Reported by Coverity (CID
1401684).
for(state_t::const_iterator i = s_state.begin(); i != s_state.end() ; ++i) {
BB2DomainInfo h;
- safeGetBBDomainInfo(i->d_id, &h);
+ if (!safeGetBBDomainInfo(i->d_id, &h)) {
+ continue;
+ }
+
shared_ptr<const recordstorage_t> rhandle = h.d_records.get();
for(recordstorage_t::const_iterator ri = rhandle->begin(); result.size() < static_cast<vector<DNSResourceRecord>::size_type>(maxResults) && ri != rhandle->end(); ri++) {