Fixed uninitialised memory lucky bug
This commit is contained in:
parent
0b651b819a
commit
30f288e5d7
1 changed files with 4 additions and 1 deletions
|
@ -336,7 +336,9 @@ static int _RegexMatcher_Create(RegexMatcher* matcher, Regex* regex, StringView
|
||||||
return stack_code;
|
return stack_code;
|
||||||
}
|
}
|
||||||
|
|
||||||
RegexMatchThread* root_thread = _RegexMatchThreadGroup_NewThread(&matcher->top_group);
|
RegexMatchThread* root_thread = _RegexMatchThreadGroup_NewThread(
|
||||||
|
&matcher->top_group
|
||||||
|
);
|
||||||
if (root_thread == NULL) {
|
if (root_thread == NULL) {
|
||||||
RegexMatchThreadGroup_Destroy2(&matcher->top_group);
|
RegexMatchThreadGroup_Destroy2(&matcher->top_group);
|
||||||
DynamicArray_Destroy(&matcher->visitor_stack);
|
DynamicArray_Destroy(&matcher->visitor_stack);
|
||||||
|
@ -347,6 +349,7 @@ static int _RegexMatcher_Create(RegexMatcher* matcher, Regex* regex, StringView
|
||||||
DynamicArray_Destroy(&matcher->visitor_stack);
|
DynamicArray_Destroy(&matcher->visitor_stack);
|
||||||
return ENOMEM;
|
return ENOMEM;
|
||||||
}
|
}
|
||||||
|
root_thread->number = 0;
|
||||||
|
|
||||||
matcher->depth = 1;
|
matcher->depth = 1;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue