diff options
Diffstat (limited to 'subsurface-core')
-rw-r--r-- | subsurface-core/serial_ftdi.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/subsurface-core/serial_ftdi.c b/subsurface-core/serial_ftdi.c index cbac026cf..ff1335171 100644 --- a/subsurface-core/serial_ftdi.c +++ b/subsurface-core/serial_ftdi.c @@ -218,6 +218,7 @@ static dc_status_t serial_ftdi_open (serial_t **out, dc_context_t *context, cons } if (ftdi_usb_reset(ftdi_ctx)) { + free(device); ERROR (context, "%s", ftdi_get_error_string(ftdi_ctx)); return DC_STATUS_IO; } |