Explorar o código

Fix memory leak in parse_tree.

Jelmer Vernooij %!s(int64=16) %!d(string=hai) anos
pai
achega
957336e328
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  1. 2 0
      dulwich/_objects.c

+ 2 - 0
dulwich/_objects.c

@@ -117,6 +117,8 @@ static PyObject *py_parse_tree(PyObject *self, PyObject *args)
             return NULL;
         }
 		PyDict_SetItem(ret, name, item);
+		Py_DECREF(name);
+		Py_DECREF(item);
 
 		text += namelen+21;
     }