]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Fix warning about pointer with non-zero offset being freed 13617/head
authorFred Morcos <fred.morcos@open-xchange.com>
Wed, 13 Dec 2023 13:50:59 +0000 (14:50 +0100)
committerFred Morcos <fred.morcos@open-xchange.com>
Tue, 19 Dec 2023 14:55:04 +0000 (15:55 +0100)
pdns/pdnsutil.cc

index 4502f4c081200c72c1f9abec21e4c527246d6249..79f3476df4a0abca105a53cd157680cb6f28d613 100644 (file)
@@ -1,4 +1,3 @@
-
 #include <boost/smart_ptr/make_shared_array.hpp>
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -12,6 +11,7 @@
 #include "statbag.hh"
 #include "base32.hh"
 #include "base64.hh"
+#include "dns.hh"
 
 #include <boost/program_options.hpp>
 #include <boost/assign/std/vector.hpp>
@@ -925,7 +925,7 @@ static int increaseSerial(const DNSName& zone, DNSSECKeeper &dk)
 
   sd.db->startTransaction(zone, -1);
 
-  if (!sd.db->replaceRRSet(sd.domain_id, zone, rr.qtype, vector<DNSResourceRecord>(1, rr))) {
+  if (!sd.db->replaceRRSet(sd.domain_id, zone, rr.qtype, {rr})) {
    sd.db->abortTransaction();
    cerr<<"Backend did not replace SOA record. Backend might not support this operation."<<endl;
    return -1;