ENH: fix memory leak

This commit is contained in:
Bill Hoffman 2008-07-09 11:46:03 -04:00
parent 0d54001276
commit 3366e6c2cd
1 changed files with 1 additions and 0 deletions

View File

@ -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];