Fix memory leak in parse_tree.
authorJelmer Vernooij <jelmer@samba.org>
Sat, 2 May 2009 16:21:13 +0000 (16:23 +0002)
committerJelmer Vernooij <jelmer@samba.org>
Sat, 2 May 2009 16:21:13 +0000 (16:23 +0002)
dulwich/_objects.c

index 5689d56dc25ca37194e3182d893d7ede2c0017e6..bad0297400336b4ae9a1460ad71187da0aaeb676 100644 (file)
@@ -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;
     }