--- libssh2-1.4.0-20111121-orig\src\kex.c	Mon Nov 21 11:52:43 2011
+++ libssh2-1.4.0-20111121\src\kex.c	Wed Oct 26 04:06:03 2011
@@ -1997,7 +1997,7 @@
     /* correct number of pointers copied? (test the code above) */
     if ( j!=ialg ) {
         /* deallocate buffer */
-        LIBSSH2_FREE(session, (void *)*algs);
+        LIBSSH2_FREE(session, *algs);
         *algs = NULL;
 
         return _libssh2_error(session, LIBSSH2_ERROR_BAD_USE,
