netdb: Add return check in rexec_af

Signed-off-by: anjiahao <anjiahao@xiaomi.com>
This commit is contained in:
anjiahao 2022-09-14 16:50:38 +08:00 committed by Alan Carvalho de Assis
parent f325ed7180
commit 287467b81b

View File

@ -110,7 +110,11 @@ int rexec_af(FAR char **ahost, int inport, FAR const char *user,
/* ignore second connection(fd2p always is NULL) */ /* ignore second connection(fd2p always is NULL) */
write(sock, "", 1); ret = write(sock, "", 1);
if (ret < 0)
{
goto conn_out;
}
/* Send username */ /* Send username */