Skip to content

Commit 46d19d3

Browse files
check WsfBufAlloc
1 parent 90be8d7 commit 46d19d3

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

features/FEATURE_BLE/ble/pal/SimpleEventQueue.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,10 @@ struct SimpleEventQueue : EventQueue {
7474
return false;
7575
}
7676
uint8_t* event_buf = (uint8_t*)WsfBufAlloc(sizeof(EventNode));
77+
if (event_buf == NULL) {
78+
error("\r\n%s:%d Cordio WsfBufAlloc out of memory\r\n", __FILE__, __LINE__);
79+
return false;
80+
}
7781
EventNode* next = new(event_buf) EventNode(event);
7882
if (next == NULL) {
7983
return false;

0 commit comments

Comments
 (0)