From d0f4bb3825281f6acb84477d6879cc494ffa1aaa Mon Sep 17 00:00:00 2001 From: Christian Hofstaedtler Date: Sun, 18 Jan 2015 18:42:16 +0100 Subject: [PATCH] Auth API: fix missing abortTransaction() in error case Noticed by Aki Tuomi. --- pdns/ws-auth.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/pdns/ws-auth.cc b/pdns/ws-auth.cc index c46928569a..4014791441 100644 --- a/pdns/ws-auth.cc +++ b/pdns/ws-auth.cc @@ -1017,6 +1017,7 @@ static void patchZone(HttpRequest* req, HttpResponse* resp) { sd.db->startTransaction(rr.qname); if (!sd.db->replaceRRSet(sd.domain_id, rr.qname, rr.qtype, vector(1, rr))) { + sd.db->abortTransaction(); throw ApiException("PTR-Hosting backend for "+rr.qname+"/"+rr.qtype.getName()+" does not support editing records."); } sd.db->commitTransaction(); -- 2.47.2