Fix termios.c warnings

pull/1092/head
Mike Black W9MDB 2022-07-22 22:36:47 -05:00
rodzic 05941406da
commit ff15e141ef
1 zmienionych plików z 1 dodań i 10 usunięć

Wyświetl plik

@ -1253,12 +1253,6 @@ static struct termios_list *add_port(const char *filename)
strncpy(port->filename, filename, sizeof(port->filename) - 1);
/* didn't free well? strdup( filename ); */
if (! port->filename)
{
goto fail;
}
port->fd = get_free_fd();
@ -1303,12 +1297,9 @@ fail:
if (port->sis) { free(port->sis); }
/* had problems with strdup
if ( port->filename ) free( port->filename );
*/
if (port) { free(port); }
return port;
return NULL;
}
/*----------------------------------------------------------