mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
#3668: When PyArg_ParseTuple correctly parses a s* format, but raises an
exception afterwards (for a subsequent parameter), the user code will not call PyBuffer_Release() and memory will leak. Reviewed by Amaury Forgeot d'Arc.
This commit is contained in:
parent
db26f7c137
commit
f7199578be
4 changed files with 59 additions and 22 deletions
|
@ -9,13 +9,6 @@
|
|||
typedef void (*destructor1)(void *);
|
||||
typedef void (*destructor2)(void *, void*);
|
||||
|
||||
typedef struct {
|
||||
PyObject_HEAD
|
||||
void *cobject;
|
||||
void *desc;
|
||||
void (*destructor)(void *);
|
||||
} PyCObject;
|
||||
|
||||
PyObject *
|
||||
PyCObject_FromVoidPtr(void *cobj, void (*destr)(void *))
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue