From e2e32dcc0d21a75017beccfa5f27ae71732dc963 Mon Sep 17 00:00:00 2001 From: cmpilato Date: Mon, 29 Mar 2004 15:59:17 +0000 Subject: [PATCH] Fix some memory leaks in the TParse code. Patch by Erik Huelsmann . git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@817 8cb11bc2-c004-0410-86c3-e597b4017df7 --- tparse/tparse.h | 1 + tparse/tparsemodule.cpp | 5 ----- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/tparse/tparse.h b/tparse/tparse.h index 8f503dc1..6c028d65 100644 --- a/tparse/tparse.h +++ b/tparse/tparse.h @@ -145,6 +145,7 @@ class TokenParser { ~TokenParser() { if (input!=NULL) { delete input;input=NULL; }; + if (backget!=NULL) { delstr(backget); backget=NULL; }; }; }; diff --git a/tparse/tparsemodule.cpp b/tparse/tparsemodule.cpp index 3dbde09e..6f5830ab 100644 --- a/tparse/tparsemodule.cpp +++ b/tparse/tparsemodule.cpp @@ -146,7 +146,6 @@ class PythonSink : public Sink { int define_revision(char *revision, long timestamp, char *author, char *state, Branche *branches, char *next) { PyObject *pbranchs=PyList_New(0); - Py_INCREF(pbranchs); Branche *move=branches; while (move!=NULL) { PyList_Append(pbranchs, PyString_FromString(move->name) ); @@ -277,7 +276,3 @@ static PyObject * tparse( PyObject *self, PyObject *args) Py_INCREF(Py_None); return Py_None; }; - - - - \ No newline at end of file