]> granicus.if.org Git - python/commit
bpo-29683 - Fixes to _PyCode_SetExtra when co_extra->ce->extras is (#376)
authorBrian Coleman <brianfcoleman@gmail.com>
Thu, 2 Mar 2017 10:32:18 +0000 (10:32 +0000)
committerVictor Stinner <victor.stinner@gmail.com>
Thu, 2 Mar 2017 10:32:18 +0000 (11:32 +0100)
commit6a9122ce6969902e119133dac660bf515616c7dd
tree2e42efb401b91e266f8af1a2e8db88d012d655a5
parent275104e86b0a3d88bfa1aaf51f70c5db3b4f47c4
bpo-29683 - Fixes to _PyCode_SetExtra when co_extra->ce->extras is (#376)

allocated.

On PyMem_Realloc failure, _PyCode_SetExtra should free co_extra if
co_extra->ce_extras could not be allocated.
On PyMem_Realloc success, _PyCode_SetExtra should set all unused slots in
co_extra->ce_extras to NULL.
Misc/NEWS
Objects/codeobject.c