Browse Source

coercion memory leak fix, part 2

David Rose 16 years ago
parent
commit
638e46d489
1 changed files with 1 additions and 0 deletions
  1. 1 0
      dtool/src/interrogatedb/py_panda.cxx

+ 1 - 0
dtool/src/interrogatedb/py_panda.cxx

@@ -88,6 +88,7 @@ attempt_coercion(PyObject *self, Dtool_PyTypedObject *classdef,
           (*coerced) = PyList_New(0);
           (*coerced) = PyList_New(0);
         }
         }
         PyList_Append(*coerced, obj);
         PyList_Append(*coerced, obj);
+        Py_DECREF(obj);
         return result;
         return result;
       }
       }
       // Some problem getting the C++ pointer from our created
       // Some problem getting the C++ pointer from our created