fix leak in pcrepp copy cons

This commit is contained in:
Timothy Stack 2020-12-01 14:00:28 -08:00
parent 86d515b4bc
commit 8494aefd50
1 changed files with 3 additions and 1 deletions

View File

@ -409,7 +409,9 @@ public:
};
pcrepp(const pcrepp &other)
: p_code(other.p_code), p_pattern(other.p_pattern)
: p_code(other.p_code),
p_pattern(other.p_pattern),
p_code_extra(pcre_free_study)
{
pcre_refcount(this->p_code, 1);
this->study();