Skip to content

Fix memory leak for PyErr_Occured with NEWINSTANCE

David Gobbi requested to merge dgobbi/vtk:newinstance-leak into master

If PyErr_Occured during a call to a method with a VTK_NEWINSTANCE attribute (i.e. if the C++ method calls Python code that fails), the returned object pointer would leak. This change will free the pointer to avoid the leak.

Closes: #18378 (closed)

Edited by David Gobbi

Merge request reports