Skip to content

Commit 083f651

Browse files
authored
Merge pull request #12024 from mtomczykmobica/ONME-4366
ONME-4366 - Fix UBLOX_EVK_ODIN_W2 fails in emac tests due to heap mem…
2 parents 7a085b4 + 0693da6 commit 083f651

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

TESTS/network/emac/emac_util.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ static rtos::Semaphore link_status_semaphore;
9292
#if defined (__ICCARM__)
9393
#pragma location = ".ethusbram"
9494
#endif
95-
ETHMEM_SECTION static EventQueue worker_loop_event_queue(20 * EVENTS_EVENT_SIZE);
95+
ETHMEM_SECTION static EventQueue worker_loop_event_queue(50 * EVENTS_EVENT_SIZE);
9696

9797
static void worker_loop_event_cb(int event);
9898
static Event<void(int)> worker_loop_event(&worker_loop_event_queue, worker_loop_event_cb);
@@ -434,7 +434,11 @@ void emac_if_link_state_change_cb(bool up)
434434

435435
void emac_if_link_input_cb(void *buf)
436436
{
437-
link_input_event.post(buf);
437+
if (link_input_event.post(buf) == 0) {
438+
if (buf) {
439+
emac_m_mngr_get()->free(buf);
440+
}
441+
}
438442
}
439443

440444
static void link_input_event_cb(void *buf)

0 commit comments

Comments
 (0)