diff options
author | Andrew M. Kuchling <amk@amk.ca> | 2000-02-18 18:30:01 (GMT) |
---|---|---|
committer | Andrew M. Kuchling <amk@amk.ca> | 2000-02-18 18:30:01 (GMT) |
commit | 0c7822e8325420d9f76c6f38d2d7a1b1a4291a76 (patch) | |
tree | 77ef18257587abb0e50acb729bdbae1e068b0174 /Modules | |
parent | 3bb578c128019318d72c12251571beb14136d83b (diff) | |
download | cpython-0c7822e8325420d9f76c6f38d2d7a1b1a4291a76.zip cpython-0c7822e8325420d9f76c6f38d2d7a1b1a4291a76.tar.gz cpython-0c7822e8325420d9f76c6f38d2d7a1b1a4291a76.tar.bz2 |
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.
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/pcremodule.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/Modules/pcremodule.c b/Modules/pcremodule.c index 9ae9226..6f6b910 100644 --- a/Modules/pcremodule.c +++ b/Modules/pcremodule.c @@ -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); } |