bpo-30704, bpo-30604: Fix memleak in code_dealloc() (#2455)

Free also co_extra->ce_extras, not only co_extra.
This commit is contained in:
Victor Stinner 2017-06-28 02:12:00 +02:00 committed by GitHub
parent 36fc896740
commit 23e7944eba
1 changed files with 2 additions and 1 deletions

View File

@ -427,7 +427,8 @@ code_dealloc(PyCodeObject *co)
}
}
PyMem_FREE(co->co_extra);
PyMem_Free(co_extra->ce_extras);
PyMem_Free(co_extra);
}
Py_XDECREF(co->co_code);