session_free: wrong variable used for keeping state
session_free: wrong variable used for keeping state

If libssh2_session_free is called without the channel being freed
previously by libssh2_channel_free a memory leak could occur.

A mismatch of states variables in session_free() prevent the call to
libssh2_channel_free function. session->state member is used instead of
session->free_state.

It causes a leak of around 600 bytes on every connection on my systems
(Linux, x64 and PPC).

(Debugging done under contract for Accedian Networks)

Fixes #246

Signed-off-by: Brian White <d8bbf19083844493ef08581d1c38fbc50ba5d18b@mscdex.net>

mafintosh/ssh2,Drooids/ssh2,mscdex/ssh2,laktek/ssh2-chromeify,Drooids/ssh2,24hr/ssh2,mcanthony/ssh2,mscdex/ssh2,laktek/ssh2-chromeify,ArielAbreu/ssh2,ianscrivener/ssh2,mcanthony/ssh2,mscdex/ssh2,24hr/ssh2,ianscrivener/ssh2,jskirst/sftp-to-http,onilabs/ssh2,mscdex/ssh2,mafintosh/ssh2,mafintosh/ssh2,Student007/ssh2,onilabs/ssh2,ArielAbreu/ssh2,Student007/ssh2,jskirst/sftp-to-http,laktek/ssh2-chromeify