bpo-44608: Fix memory leak in _tkinter._flatten() (GH-27107)


if it is called with a sequence or set, but not list or tuple.
(cherry picked from commit f572cbf1faab33d9afbbe3e95738ed6fbe6e48e6)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
3 files changed