Patch from Vladimir Marangozov <marangoz@python.inrialpes.fr>:

The buffers self->regex and self->regex_extra are allocated in
	pcre_compile() and pcre_study() via pcre_malloc, but are released
	via free() instead of pcre_free.
This commit is contained in:
Andrew M. Kuchling 2000-02-18 18:30:01 +00:00
parent 3bb578c128
commit 0c7822e832
1 changed files with 2 additions and 4 deletions

View File

@ -93,10 +93,8 @@ static void
PyPcre_dealloc(self)
PcreObject *self;
{
if (self->regex) free(self->regex);
if (self->regex_extra) free(self->regex_extra);
self->regex=NULL;
self->regex_extra=NULL;
if (self->regex) (pcre_free)(self->regex);
if (self->regex_extra) (pcre_free)(self->regex_extra);
PyMem_DEL(self);
}