diff --git a/TESTS/network/emac/emac_util.cpp b/TESTS/network/emac/emac_util.cpp index e74278cbc8..11ee559c8d 100644 --- a/TESTS/network/emac/emac_util.cpp +++ b/TESTS/network/emac/emac_util.cpp @@ -92,7 +92,7 @@ static rtos::Semaphore link_status_semaphore; #if defined (__ICCARM__) #pragma location = ".ethusbram" #endif -ETHMEM_SECTION static EventQueue worker_loop_event_queue(20 * EVENTS_EVENT_SIZE); +ETHMEM_SECTION static EventQueue worker_loop_event_queue(50 * EVENTS_EVENT_SIZE); static void worker_loop_event_cb(int event); static Event worker_loop_event(&worker_loop_event_queue, worker_loop_event_cb); @@ -434,7 +434,11 @@ void emac_if_link_state_change_cb(bool up) void emac_if_link_input_cb(void *buf) { - link_input_event.post(buf); + if (link_input_event.post(buf) == 0) { + if (buf) { + emac_m_mngr_get()->free(buf); + } + } } static void link_input_event_cb(void *buf)