浏览代码

Fix for RegEx.search() memory leak on Windows

GlyphTheWolf 3 年之前
父节点
当前提交
6556442d46
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      modules/regex/regex.cpp

+ 2 - 0
modules/regex/regex.cpp

@@ -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;
 		}