From: bert hubert Date: Thu, 9 Jun 2016 06:55:13 +0000 (+0200) Subject: alternate fix for #3966, closes #3966 X-Git-Tag: auth-4.0.0-rc1~56 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7fe1a82b64ce2818be383b9b46a6e2449fe93d40;p=pdns alternate fix for #3966, closes #3966 --- diff --git a/pdns/ws-auth.cc b/pdns/ws-auth.cc index 61f4e92d2..22f236348 100644 --- a/pdns/ws-auth.cc +++ b/pdns/ws-auth.cc @@ -291,7 +291,8 @@ void AuthWebServer::indexfunction(HttpRequest* req, HttpResponse* resp) /** Helper to build a record content as needed. */ static inline string makeRecordContent(const QType& qtype, const string& content, bool noDot) { // noDot: for backend storage, pass true. for API users, pass false. - return DNSRecordContent::mastermake(qtype.getCode(), 1, content)->getZoneRepresentation(noDot); + std::unique_ptr drc(DNSRecordContent::mastermake(qtype.getCode(), 1, content)); + return drc->getZoneRepresentation(noDot); } /** "Normalize" record content for API consumers. */