From 995bc5cb21c7fd364e6e51e731a06281fd14c3dd Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Fri, 9 Feb 2024 17:40:16 -0800 Subject: [PATCH] fix memory leak parameter is not passed by value but by reference. Treat it that way. Signed-off-by: Rosen Penev --- pdns/pdnsutil.cc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pdns/pdnsutil.cc b/pdns/pdnsutil.cc index 15d241682e786..3feb7f446cd0e 100644 --- a/pdns/pdnsutil.cc +++ b/pdns/pdnsutil.cc @@ -1,4 +1,3 @@ -#include #ifdef HAVE_CONFIG_H #include "config.h" #endif @@ -913,10 +912,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()) {