[3.13] gh-126881: fix finalization of dtoa state (GH-126904) (#127395)

gh-126881: fix finalization of dtoa state (GH-126904)
(cherry picked from commit 762c603a866146afc7db2591fb49605e0858e9b1)

Co-authored-by: Kumar Aditya <[email protected]>
2 files changed