Permalink
Browse files

geobackend: fix possible nullptr deref

  • Loading branch information...
1 parent 3506cc6 commit 7593c405208f1ce1842d0eb8de705d86175ce166 @zeha zeha committed with mind04 Sep 8, 2013
Showing with 3 additions and 2 deletions.
  1. +3 −2 modules/geobackend/geobackend.cc
@@ -201,8 +201,9 @@ void GeoBackend::answerGeoRecord(const QType &qtype, const string &qdomain, DNSP
fillGeoResourceRecord(qdomain, target, rr);
L << Logger::Debug << logprefix << "Serving " << qdomain << " "
- << rr->qtype.getName() << " " << target << " to " << p->getRemote()
- << " (" << isocode << ")" << endl;
+ << rr->qtype.getName() << " " << target << " to "
+ << (p != NULL ? p->getRemote() : "(unknown)")
+ << " (" << isocode << ")" << endl;
answers.push_back(rr);
}

0 comments on commit 7593c40

Please sign in to comment.