mirror of
https://github.com/python/cpython.git
synced 2025-08-31 22:18:28 +00:00
* clmodule.c (doParams): free PVbuffer in error condition.
* frameobject.c (newframeobject): initialize ob_type if taking entry from the free list, since it is zeroed out when DEBUG is defined.
This commit is contained in:
parent
d29eb6232c
commit
f64992e95d
2 changed files with 4 additions and 1 deletions
|
@ -365,8 +365,10 @@ doParams(clobject *self, object *args, int (*func)(CL_Handle, int *, int),
|
||||||
|
|
||||||
error_handler_called = 0;
|
error_handler_called = 0;
|
||||||
(*func)(self->ob_compressorHdl, PVbuffer, length);
|
(*func)(self->ob_compressorHdl, PVbuffer, length);
|
||||||
if (error_handler_called)
|
if (error_handler_called) {
|
||||||
|
DEL(PVbuffer);
|
||||||
return NULL;
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
if (modified) {
|
if (modified) {
|
||||||
for (i = 0; i < length; i++) {
|
for (i = 0; i < length; i++) {
|
||||||
|
|
|
@ -137,6 +137,7 @@ newframeobject(back, code, globals, locals, owner, nvalues, nblocks)
|
||||||
else {
|
else {
|
||||||
f = free_list;
|
f = free_list;
|
||||||
free_list = free_list->f_back;
|
free_list = free_list->f_back;
|
||||||
|
f->ob_type = &Frametype;
|
||||||
NEWREF(f);
|
NEWREF(f);
|
||||||
}
|
}
|
||||||
if (f != NULL) {
|
if (f != NULL) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue