cmocka: Add missing null check in _expect_check()

This commit is contained in:
Andreas Schneider 2024-01-06 13:07:43 +01:00
parent 9e6ab12ae2
commit de511ab272
1 changed files with 1 additions and 0 deletions

View File

@ -1150,6 +1150,7 @@ void _expect_check(
CheckParameterEvent * const check =
event ? event : (CheckParameterEvent*)malloc(sizeof(*check));
const char* symbols[] = {function, parameter};
assert_non_null(check);
check->parameter_name = parameter;
check->check_value = check_function;
check->check_value_data = check_data;