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 22:34:57 +02:00
committed by GitHub
parent 8a7f8c5cbd
commit 5f827089d3
+1 -1
View File
@@ -173,7 +173,7 @@ void RegEx::ClearMatch()
mErrorCode = 0;
mError = nullptr;
if (subject)
delete [] subject;
free(subject);
subject = nullptr;
mMatchCount = 0;
}