From: Remi Gacogne Date: Tue, 29 Mar 2022 15:49:41 +0000 (+0200) Subject: LMDB: Clarify that the base commit() method should be called in the dtor X-Git-Tag: rec-4.7.0-beta1~28^2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4133b8edaeab487f2d0b54759d6253a1b80f2f48;p=thirdparty%2Fpdns.git LMDB: Clarify that the base commit() method should be called in the dtor CodeQL warns that there might some ambiguity about whether the base or derived commit() method is called in derived classes: https://github.com/PowerDNS/pdns/security/code-scanning/379 --- diff --git a/ext/lmdb-safe/lmdb-safe.cc b/ext/lmdb-safe/lmdb-safe.cc index f159eafafa..ed7f27a1e2 100644 --- a/ext/lmdb-safe/lmdb-safe.cc +++ b/ext/lmdb-safe/lmdb-safe.cc @@ -262,7 +262,7 @@ MDBROTransactionImpl::MDBROTransactionImpl(MDBEnv *parent, int flags): MDBROTransactionImpl::~MDBROTransactionImpl() { // this is safe because C++ will not call overrides of virtual methods in destructors. - commit(); + MDBROTransactionImpl::commit(); } void MDBROTransactionImpl::abort()