This commit is contained in:
iceman1001 2021-12-22 21:09:28 +01:00
commit dd08c69f7e

View file

@ -161,17 +161,15 @@ serial_port uart_open(const char *pcPortName, uint32_t speed) {
close(sfd); close(sfd);
} }
if (rp == NULL) { /* No address succeeded */
PrintAndLogEx(ERR, "error: Could not connect");
freeaddrinfo(addr); freeaddrinfo(addr);
free(addrstr); free(addrstr);
if (rp == NULL) { /* No address succeeded */
PrintAndLogEx(ERR, "error: Could not connect");
free(sp); free(sp);
return INVALID_SERIAL_PORT; return INVALID_SERIAL_PORT;
} }
freeaddrinfo(addr);
free(addrstr);
sp->fd = sfd; sp->fd = sfd;
int one = 1; int one = 1;