AP_Module: use NEW_NOTHROW for new(std::nothrow)

This commit is contained in:
Andrew Tridgell 2024-05-27 11:24:13 +10:00
parent e180359757
commit 3912c6a5e0

View File

@ -55,7 +55,7 @@ void AP_Module::module_scan(const char *path)
void *s = dlsym(m, hook_names[i]);
if (s != nullptr) {
// found a hook in this module, add it to the list
struct hook_list *h = new hook_list;
struct hook_list *h = NEW_NOTHROW hook_list;
if (h == nullptr) {
AP_HAL::panic("Failed to allocate hook for %s", hook_names[i]);
}