Browse Source

interrogate: Fix memory leak in __setstate__

rdb 5 years ago
parent
commit
3e1d4aa6b5
1 changed files with 1 additions and 1 deletions
  1. 1 1
      dtool/src/interrogate/interfaceMakerPythonNative.cxx

+ 1 - 1
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";
     }