check WsfBufAlloc

pull/8269/head
paul-szczepanek-arm 2018-09-27 13:45:36 +01:00
parent 90be8d7807
commit 46d19d3732
1 changed files with 4 additions and 0 deletions

View File

@ -74,6 +74,10 @@ struct SimpleEventQueue : EventQueue {
return false;
}
uint8_t* event_buf = (uint8_t*)WsfBufAlloc(sizeof(EventNode));
if (event_buf == NULL) {
error("\r\n%s:%d Cordio WsfBufAlloc out of memory\r\n", __FILE__, __LINE__);
return false;
}
EventNode* next = new(event_buf) EventNode(event);
if (next == NULL) {
return false;