don't free event handler list manually; let gc do it

This commit is contained in:
Dan Halbert 2018-12-31 09:02:43 -05:00
parent b6b5ed9c89
commit 941ccf87c8

View File

@ -48,12 +48,7 @@ typedef struct event_handler {
static event_handler_t *m_event_handlers = NULL;
void ble_drv_reset() {
event_handler_t *handler = m_event_handlers;
while (handler != NULL) {
event_handler_t *next = handler->next;
m_free(handler);
handler = next;
}
// Linked list items will be gc'd.
m_event_handlers = NULL;
}