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:
bottiger1 2023-06-12 13:34:57 -07:00 committed by GitHub
parent 8a7f8c5cbd
commit 5f827089d3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -173,7 +173,7 @@ void RegEx::ClearMatch()
mErrorCode = 0;
mError = nullptr;
if (subject)
delete [] subject;
free(subject);
subject = nullptr;
mMatchCount = 0;
}