Fix memory leak for PyErr_Occured with NEWINSTANCE
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