diff --git a/uart/uart_posix.c b/uart/uart_posix.c index b9df932d6..c77457d91 100644 --- a/uart/uart_posix.c +++ b/uart/uart_posix.c @@ -102,6 +102,7 @@ serial_port uart_open(const char* pcPortName) { printf("Error: getaddrinfo: %s\n", gai_strerror(s)); freeaddrinfo(addr); free(addrstr); + free(sp); return INVALID_SERIAL_PORT; }