mirror of
https://github.com/godotengine/godot.git
synced 2025-10-15 02:49:24 +00:00
Assign pointer null in RegEx::clear to avoid double free on destruction.
This commit is contained in:
@@ -178,13 +178,17 @@ void RegEx::clear() {
|
||||
|
||||
if (sizeof(CharType) == 2) {
|
||||
|
||||
if (code)
|
||||
if (code) {
|
||||
pcre2_code_free_16((pcre2_code_16 *)code);
|
||||
code = NULL;
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
if (code)
|
||||
if (code) {
|
||||
pcre2_code_free_32((pcre2_code_32 *)code);
|
||||
code = NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user