From 8512c0ea093976e13b62fe27cb4965c51a3fa8fc Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Sun, 24 Feb 2019 19:25:44 +0100 Subject: [PATCH] fix: mem leak --- uart/uart_posix.c | 1 + 1 file changed, 1 insertion(+) diff --git a/uart/uart_posix.c b/uart/uart_posix.c index e3d7753a9..c3ff7dcca 100644 --- a/uart/uart_posix.c +++ b/uart/uart_posix.c @@ -83,6 +83,7 @@ serial_port uart_open(const char* pcPortName) { if (addrstr == NULL) { printf("Error: strdup\n"); + free(sp); return INVALID_SERIAL_PORT; }