diff options
| author | Dan Halbert <halbert@halwitz.org> | 2018-12-29 13:55:10 -0500 |
|---|---|---|
| committer | Dan Halbert <halbert@halwitz.org> | 2018-12-29 13:55:10 -0500 |
| commit | ef39e72c7c3c3e68f73f670b7f8b7f08e813be39 (patch) | |
| tree | 056b5177b68722efa7626bbf8035e48fc9dc697d /ports/nrf/bluetooth | |
| parent | de7cadb9b2484348aa52addbae76041236682933 (diff) | |
free event handlers on reset; fix typo in Broadcaster
Diffstat (limited to 'ports/nrf/bluetooth')
| -rw-r--r-- | ports/nrf/bluetooth/ble_drv.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/ports/nrf/bluetooth/ble_drv.c b/ports/nrf/bluetooth/ble_drv.c index 41d51cfb4..57a433f70 100644 --- a/ports/nrf/bluetooth/ble_drv.c +++ b/ports/nrf/bluetooth/ble_drv.c @@ -48,7 +48,12 @@ typedef struct event_handler { static event_handler_t *m_event_handlers = NULL; void ble_drv_reset() { - // Linked-list members will be gc'd. + event_handler_t *handler = m_event_handlers; + while (handler != NULL) { + event_handler_t *next = handler->next; + m_free(handler); + handler = next; + } m_event_handlers = NULL; } |
