Don't use memory after it has been freed, pointed out by Troy Gutjahr
This commit is contained in:
parent
136b2bfcdc
commit
8223acec0a
@ -1430,11 +1430,11 @@ LIBSSH2_API int libssh2_sftp_close_handle(LIBSSH2_SFTP_HANDLE *handle)
|
|||||||
LIBSSH2_FREE(session, handle->u.dir.names_packet);
|
LIBSSH2_FREE(session, handle->u.dir.names_packet);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
handle->close_state = libssh2_NB_state_idle;
|
||||||
|
|
||||||
LIBSSH2_FREE(session, handle->handle);
|
LIBSSH2_FREE(session, handle->handle);
|
||||||
LIBSSH2_FREE(session, handle);
|
LIBSSH2_FREE(session, handle);
|
||||||
|
|
||||||
handle->close_state = libssh2_NB_state_idle;
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
/* }}} */
|
/* }}} */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user