]> git.ipfire.org Git - thirdparty/pdns.git/commit
Prevent missing mdb_env_close in error paths in upgradeToSchemav5. 16547/head
authorMiod Vallat <miod.vallat@powerdns.com>
Wed, 26 Nov 2025 10:51:46 +0000 (11:51 +0100)
committerMiod Vallat <miod.vallat@powerdns.com>
Wed, 26 Nov 2025 10:51:46 +0000 (11:51 +0100)
commita5f558abf5ecc843936b8b779020ebe1ab254e98
treef240899aea140b5a9ad7e5b01bad29d4033699e0
parent8e3c13850358b5a3451ca2851a014484b2313208
Prevent missing mdb_env_close in error paths in upgradeToSchemav5.

Using unique_ptr guards as used in getSchemaVersionAndShards, we can
guarantee that there will be no missing calls, regardless of how we
exit the function (which swears^Wthrows a lot).

Signed-off-by: Miod Vallat <miod.vallat@powerdns.com>
modules/lmdbbackend/lmdbbackend.cc