Skip to content

Commit

Permalink
Merge pull request #56763 from GlyphTheWolf/regex-memory-leak-fix
Browse files Browse the repository at this point in the history
Fix for RegEx.search() memory leak on Windows
  • Loading branch information
akien-mga authored Jan 14, 2022
2 parents 75cc95c + 6556442 commit 6fac314
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions modules/regex/regex.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,8 @@ Ref<RegExMatch> RegEx::search(const String &p_subject, int p_offset, int p_end)

if (res < 0) {
pcre2_match_data_free_16(match);
pcre2_match_context_free_16(mctx);

return nullptr;
}

Expand Down

0 comments on commit 6fac314

Please sign in to comment.