From 3e1d4aa6b5921c918ae1e8bcffbdc59e60fde2af Mon Sep 17 00:00:00 2001 From: rdb Date: Thu, 31 Dec 2020 18:12:52 +0100 Subject: [PATCH] interrogate: Fix memory leak in __setstate__ --- dtool/src/interrogate/interfaceMakerPythonNative.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dtool/src/interrogate/interfaceMakerPythonNative.cxx b/dtool/src/interrogate/interfaceMakerPythonNative.cxx index 459ed7d5e5..91114c747c 100644 --- a/dtool/src/interrogate/interfaceMakerPythonNative.cxx +++ b/dtool/src/interrogate/interfaceMakerPythonNative.cxx @@ -3625,7 +3625,7 @@ write_function_for_name(ostream &out, Object *obj, out << " }\n" << " " << cClassName << " *local_this = new " << cClassName << ";\n" << " DTool_PyInit_Finalize(self, local_this, " - << "((Dtool_PyInstDef *)self)->_My_Type, false, false);\n" + << "((Dtool_PyInstDef *)self)->_My_Type, true, false);\n" << " if (local_this == nullptr) {\n" << " PyErr_NoMemory();\n"; }