From: Christian Hofstaedtler Date: Sun, 18 Jan 2015 17:42:16 +0000 (+0100) Subject: Auth API: fix missing abortTransaction() in error case X-Git-Tag: rec-3.7.0-rc1~13^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d0f4bb3825281f6acb84477d6879cc494ffa1aaa;p=thirdparty%2Fpdns.git Auth API: fix missing abortTransaction() in error case Noticed by Aki Tuomi. --- 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();