mirror of https://github.com/wolfSSL/wolfssh.git
Free resources
parent
b0cf4cfa5d
commit
5ea74bc22d
|
@ -2416,6 +2416,8 @@ static int StartSSHD(int argc, char** argv)
|
||||||
== SOCKET_ERROR) {
|
== SOCKET_ERROR) {
|
||||||
WLOG(WS_LOG_DEBUG, "wolfSSH non-fatal error: "
|
WLOG(WS_LOG_DEBUG, "wolfSSH non-fatal error: "
|
||||||
"ioctlsocket failed");
|
"ioctlsocket failed");
|
||||||
|
WCLOSESOCKET(conn->fd);
|
||||||
|
WFREE(conn, NULL, DYNTYPE_SSHD);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
#elif defined(WOLFSSL_MDK_ARM) || defined(WOLFSSL_KEIL_TCP_NET) \
|
#elif defined(WOLFSSL_MDK_ARM) || defined(WOLFSSL_KEIL_TCP_NET) \
|
||||||
|
@ -2427,12 +2429,16 @@ static int StartSSHD(int argc, char** argv)
|
||||||
if (flags < 0) {
|
if (flags < 0) {
|
||||||
WLOG(WS_LOG_DEBUG, "wolfSSH non-fatal error: "
|
WLOG(WS_LOG_DEBUG, "wolfSSH non-fatal error: "
|
||||||
"fcntl get failed");
|
"fcntl get failed");
|
||||||
|
WCLOSESOCKET(conn->fd);
|
||||||
|
WFREE(conn, NULL, DYNTYPE_SSHD);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
flags = fcntl(conn->fd, F_SETFL, flags | O_NONBLOCK);
|
flags = fcntl(conn->fd, F_SETFL, flags | O_NONBLOCK);
|
||||||
if (flags < 0) {
|
if (flags < 0) {
|
||||||
WLOG(WS_LOG_DEBUG, "wolfSSH non-fatal error: "
|
WLOG(WS_LOG_DEBUG, "wolfSSH non-fatal error: "
|
||||||
"fcntl set failed");
|
"fcntl set failed");
|
||||||
|
WCLOSESOCKET(conn->fd);
|
||||||
|
WFREE(conn, NULL, DYNTYPE_SSHD);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue