소스 검색

Fix memory leak in parse_tree.

Jelmer Vernooij 16 년 전
부모
커밋
957336e328
1개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  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;
     }