summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Modules/pcremodule.c6
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);
}