diff --git a/libs/libc/netdb/lib_rexec.c b/libs/libc/netdb/lib_rexec.c index 2ceed200dd..00f69ce369 100644 --- a/libs/libc/netdb/lib_rexec.c +++ b/libs/libc/netdb/lib_rexec.c @@ -110,7 +110,11 @@ int rexec_af(FAR char **ahost, int inport, FAR const char *user, /* ignore second connection(fd2p always is NULL) */ - write(sock, "", 1); + ret = write(sock, "", 1); + if (ret < 0) + { + goto conn_out; + } /* Send username */