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

View file

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