diff --git a/app/test/test_telemetry_data.c b/app/test/test_telemetry_data.c index 00326867b6..f34d691265 100644 --- a/app/test/test_telemetry_data.c +++ b/app/test/test_telemetry_data.c @@ -330,6 +330,7 @@ connect_to_socket(void) if (bytes < 0) { printf("%s: Error with socket read - %s\n", __func__, strerror(errno)); + close(sock); return -1; } buf[bytes] = '\0';