<div>*Should* not crash ??? That's funny...<br></div><div><br></div><div>void sftp_free(SFTP_SESSION *sftp){<br>        struct request_queue *ptr;<br>        channel_send_eof(sftp->channel); // *MEEEEEEEEEEEEEEK*<br>
        channel_free(sftp->channel);<br>        ptr=sftp->queue;<br>        while(ptr){<br>                struct request_queue *old;<br>                sftp_message_free(ptr->message);<br>                old=ptr->next;<br>
                free(ptr);<br>                ptr=old;</div><div>    }<br>        memset(sftp,0,sizeof(*sftp));<br>        free(sftp);<br>}<br></div>