bugfix: potential use of NULL pointer
This commit is contained in:
parent
67de62d650
commit
03815483be
@ -218,9 +218,11 @@ int main(int argc, char *argv[])
|
|||||||
libssh2_agent_disconnect(agent);
|
libssh2_agent_disconnect(agent);
|
||||||
libssh2_agent_free(agent);
|
libssh2_agent_free(agent);
|
||||||
|
|
||||||
libssh2_session_disconnect(session,
|
if(session) {
|
||||||
"Normal Shutdown, Thank you for playing");
|
libssh2_session_disconnect(session,
|
||||||
libssh2_session_free(session);
|
"Normal Shutdown, Thank you for playing");
|
||||||
|
libssh2_session_free(session);
|
||||||
|
}
|
||||||
|
|
||||||
if (sock != -1) {
|
if (sock != -1) {
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
|
Loading…
x
Reference in New Issue
Block a user