From 2e2bfc17a04e654e4b32329eb64ebb3918c6c163 Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Sun, 26 Apr 2020 13:54:55 +0200 Subject: [PATCH] coverity fix: 286678 --- client/src/uart/uart_posix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/uart/uart_posix.c b/client/src/uart/uart_posix.c index 0e05f8389..4ec3fd507 100644 --- a/client/src/uart/uart_posix.c +++ b/client/src/uart/uart_posix.c @@ -194,12 +194,12 @@ serial_port uart_open(const char *pcPortName, uint32_t speed) { } if (connect(localsocket, (struct sockaddr *) &remote, len) == -1) { + free(localsocket); free(sp); return INVALID_SERIAL_PORT; } sp->fd = localsocket; - return sp; }