Fix mismatched memory release in regex clearmatch (#2005)
subject is created with strdup which should be freed with C free and not C++ delete
This commit is contained in:
parent
8a7f8c5cbd
commit
5f827089d3
@ -173,7 +173,7 @@ void RegEx::ClearMatch()
|
||||
mErrorCode = 0;
|
||||
mError = nullptr;
|
||||
if (subject)
|
||||
delete [] subject;
|
||||
free(subject);
|
||||
subject = nullptr;
|
||||
mMatchCount = 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user