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:
parent
3bb578c128
commit
0c7822e832
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue