]> granicus.if.org Git - pdns/commitdiff
alternate fix for #3966, closes #3966
authorbert hubert <bert.hubert@netherlabs.nl>
Thu, 9 Jun 2016 06:55:13 +0000 (08:55 +0200)
committerbert hubert <bert.hubert@netherlabs.nl>
Thu, 9 Jun 2016 06:55:44 +0000 (08:55 +0200)
pdns/ws-auth.cc

index 61f4e92d2be3c49c50e08c7e0ac6ad3edceca2d8..22f2363487e7930983b1f628c8208e62e4c6e8da 100644 (file)
@@ -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<DNSRecordContent> drc(DNSRecordContent::mastermake(qtype.getCode(), 1, content));
+  return drc->getZoneRepresentation(noDot);
 }
 
 /** "Normalize" record content for API consumers. */