Skip to content

Commit 5f82708

Browse files
authored
Fix mismatched memory release in regex clearmatch (#2005)
subject is created with strdup which should be freed with C free and not C++ delete
1 parent 8a7f8c5 commit 5f82708

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

extensions/regex/CRegEx.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ void RegEx::ClearMatch()
173173
mErrorCode = 0;
174174
mError = nullptr;
175175
if (subject)
176-
delete [] subject;
176+
free(subject);
177177
subject = nullptr;
178178
mMatchCount = 0;
179179
}

0 commit comments

Comments
 (0)