gh-140593: Fix a memory leak in function my_ElementDeclHandler of pyexpat (#140602)
Ensure that the memory allocated for the content model passed to `my_ElementDeclHandler` is freed in all error paths.
This commit is contained in:
committed by
GitHub
parent
37827c1752
commit
e34a5e3304
@@ -642,7 +642,7 @@ my_ElementDeclHandler(void *userData,
|
||||
PyObject *modelobj, *nameobj;
|
||||
|
||||
if (PyErr_Occurred())
|
||||
return;
|
||||
goto finally;
|
||||
|
||||
if (flush_character_buffer(self) < 0)
|
||||
goto finally;
|
||||
|
||||
Reference in New Issue
Block a user