Skip to content

Commit 94c2b9e

Browse files
committed
SITL: Just exit(1) if insufficient memory for string duplication
1 parent e4a8a52 commit 94c2b9e

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

libraries/AP_HAL_SITL/SITL_State.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@ void SITL_State::_parse_param_init_vals(const char *to_be_set, Param_Init_Values
4040

4141
char *for_parsing = strdup(to_be_set);
4242
if (for_parsing == nullptr) {
43-
AP_HAL::panic("strdup failed (insufficient memory)");
43+
printf("strdup failed (insufficient memory)");
44+
exit(1);
4445
}
4546

4647
char *saveptr = nullptr;

0 commit comments

Comments
 (0)