pcre: use pcre_free_study to free the study data

pull/1887/head
Victor Julien 10 years ago
parent 066c4b0b24
commit ecb79391a0

@ -581,7 +581,7 @@ error:
if (pd != NULL && pd->re != NULL) if (pd != NULL && pd->re != NULL)
pcre_free(pd->re); pcre_free(pd->re);
if (pd != NULL && pd->sd != NULL) if (pd != NULL && pd->sd != NULL)
pcre_free(pd->sd); pcre_free_study(pd->sd);
if (pd) if (pd)
SCFree(pd); SCFree(pd);
return NULL; return NULL;
@ -807,7 +807,7 @@ void DetectPcreFree(void *ptr)
if (pd->re != NULL) if (pd->re != NULL)
pcre_free(pd->re); pcre_free(pd->re);
if (pd->sd != NULL) if (pd->sd != NULL)
pcre_free(pd->sd); pcre_free_study(pd->sd);
SCFree(pd); SCFree(pd);
return; return;

Loading…
Cancel
Save