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: auth-3.4.2^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=674f258ef6be5c5a5f2e6b873e41c14cefc08383;p=thirdparty%2Fpdns.git Auth API: fix missing abortTransaction() in error case Noticed by Aki Tuomi. (cherry picked from commit d0f4bb3825281f6acb84477d6879cc494ffa1aaa) --- diff --git a/pdns/ws-auth.cc b/pdns/ws-auth.cc index 228ee95371..43eb8bd879 100644 --- a/pdns/ws-auth.cc +++ b/pdns/ws-auth.cc @@ -1086,6 +1086,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();