From: Rosen Penev Date: Sat, 10 Feb 2024 01:40:16 +0000 (-0800) Subject: fix memory leak X-Git-Tag: rec-5.2.0-alpha1~135^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e22cac1c60441a4f4cc2d6497ef9dbef7737eb4d;p=thirdparty%2Fpdns.git fix memory leak parameter is not passed by value but by reference. Treat it that way. Signed-off-by: Rosen Penev --- diff --git a/pdns/pdnsutil.cc b/pdns/pdnsutil.cc index c02b295d7a..03984d8aef 100644 --- a/pdns/pdnsutil.cc +++ b/pdns/pdnsutil.cc @@ -924,10 +924,11 @@ static int increaseSerial(const DNSName& zone, DNSSECKeeper &dk) sd.db->startTransaction(zone, -1); - 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."<{rr}; + if (!sd.db->replaceRRSet(sd.domain_id, zone, rr.qtype, rrs)) { + sd.db->abortTransaction(); + cerr << "Backend did not replace SOA record. Backend might not support this operation." << endl; + return -1; } if (sd.db->doesDNSSEC()) {