diff --git a/apache2/msc_pcre.c b/apache2/msc_pcre.c index 8ca588a94f..e84692fee4 100644 --- a/apache2/msc_pcre.c +++ b/apache2/msc_pcre.c @@ -21,7 +21,7 @@ static apr_status_t msc_pcre_cleanup(msc_regex_t *regex) { if (regex != NULL) { if (regex->pe != NULL) { - free(regex->pe); + pcre_free(regex->pe); regex->pe = NULL; } if (regex->re != NULL) { @@ -71,7 +71,7 @@ void *msc_pregcomp_ex(apr_pool_t *pool, const char *pattern, int options, /* Setup the pcre_extra record if pcre_study did not already do it */ if (pe == NULL) { - pe = malloc(sizeof(pcre_extra)); + pe = pcre_malloc(sizeof(pcre_extra)); if (pe == NULL) { return NULL; }