tdb2: fix leak on lock failure during open.