mirror of
https://github.com/python/cpython
synced 2026-09-29 12:10:30 +03:00
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
1 changed files with 2 additions and 4 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue