Issue #16628: Fix a memory leak in ctypes.resize().