Fix memory leak in TreeBuilder_get

This commit is contained in:
Daniel Rodríguez Troitiño
2013-05-26 01:00:33 +02:00
parent a626b3c297
commit d388d1ab21

View File

@@ -108,6 +108,7 @@ TreeBuilder_get(TreeBuilder *self, PyObject *py_filename)
return NULL; return NULL;
entry = git_treebuilder_get(self->bld, filename); entry = git_treebuilder_get(self->bld, filename);
free(filename);
if (entry == NULL) if (entry == NULL)
Py_RETURN_NONE; Py_RETURN_NONE;