Backport r55070: Stop using PyMem_FREE while the GIL is not held.
Backport r55070: Stop using PyMem_FREE while the GIL is not held.

sk-/python2.7-type-annotator,sk-/python2.7-type-annotator,sk-/python2.7-type-annotator