diff --git a/src/kex.c b/src/kex.c
index 02e0416..c954e2b 100644
--- a/src/kex.c
+++ b/src/kex.c
@@ -368,13 +368,6 @@ int set_kex(ssh_session session){
     const char *wanted;
     enter_function();
     ssh_get_random(client->cookie,16,0);
-    if(client->methods)
-    {
-      for (i=0;i<10;i++){
-        SAFE_FREE(client->methods[i]);
-      }
-      SAFE_FREE(client->methods);
-    }
     client->methods=malloc(10 * sizeof(char **));
     if (client->methods == NULL) {
       ssh_set_error(session, SSH_FATAL, "No space left");
