summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2008-07-09 15:46:03 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2008-07-09 15:46:03 (GMT)
commit3366e6c2cd8bb2d9e30d2deb5637c840d52221a3 (patch)
tree735c548f6fa12fa1dce98268158dec3cc41eb16c
parent0d54001276a3123e35e20ee7240cdeffe401e7af (diff)
downloadCMake-3366e6c2cd8bb2d9e30d2deb5637c840d52221a3.zip
CMake-3366e6c2cd8bb2d9e30d2deb5637c840d52221a3.tar.gz
CMake-3366e6c2cd8bb2d9e30d2deb5637c840d52221a3.tar.bz2
ENH: fix memory leak
-rw-r--r--Source/kwsys/RegularExpression.cxx1
1 files changed, 1 insertions, 0 deletions
diff --git a/Source/kwsys/RegularExpression.cxx b/Source/kwsys/RegularExpression.cxx
index ac2c9b0..3566a65 100644
--- a/Source/kwsys/RegularExpression.cxx
+++ b/Source/kwsys/RegularExpression.cxx
@@ -84,6 +84,7 @@ RegularExpression& RegularExpression::operator= (const RegularExpression& rxp)
}
int ind;
this->progsize = rxp.progsize; // Copy regular expression size
+ delete [] this->program;
this->program = new char[this->progsize]; // Allocate storage
for(ind=this->progsize; ind-- != 0;) // Copy regular expresion
this->program[ind] = rxp.program[ind];