Browse Source

loader: fix leak of EntryPoint.name reference

rdb 6 years ago
parent
commit
5449f963a5
1 changed files with 1 additions and 0 deletions
  1. 1 0
      panda/src/pgraph/loaderFileTypeRegistry_ext.cxx

+ 1 - 0
panda/src/pgraph/loaderFileTypeRegistry_ext.cxx

@@ -53,6 +53,7 @@ register_deferred_type(PyObject *entry_point) {
     name_str = nullptr;
   }
 #endif
+  Py_DECREF(name);
 
   if (name_str == nullptr) {
     Dtool_Raise_TypeError("entry_point.name is expected to be str");