summaryrefslogtreecommitdiffstats
path: root/Python/modsupport.c
diff options
context:
space:
mode:
Diffstat (limited to 'Python/modsupport.c')
-rw-r--r--Python/modsupport.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/Python/modsupport.c b/Python/modsupport.c
index 2637039..2dabcf3 100644
--- a/Python/modsupport.c
+++ b/Python/modsupport.c
@@ -622,6 +622,9 @@ va_build_stack(PyObject **small_stack, Py_ssize_t small_stack_len,
va_end(lva);
if (res < 0) {
+ if (stack != small_stack) {
+ PyMem_Free(stack);
+ }
return NULL;
}