]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
libssh2: remove unused variable from libssh2's struct
authorDaniel Stenberg <daniel@haxx.se>
Thu, 16 Mar 2023 11:30:52 +0000 (12:30 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Thu, 16 Mar 2023 12:44:48 +0000 (13:44 +0100)
Closes #10777

lib/vssh/libssh2.c
lib/vssh/ssh.h

index 3720520734f9f27549aa5877a7d29b92cf5a2e77..f1154dc47a74ef5143a3986e957e4861f015b7be 100644 (file)
@@ -2405,7 +2405,6 @@ static CURLcode ssh_statemach_act(struct Curl_easy *data, bool *block)
       result = Curl_dyn_addf(&sshp->readdir, " -> %s", sshp->readdir_filename);
 
       if(result) {
-        sshc->readdir_line = NULL;
         Curl_safefree(sshp->readdir_filename);
         Curl_safefree(sshp->readdir_longentry);
         state(data, SSH_SFTP_CLOSE);
@@ -3009,12 +3008,9 @@ static CURLcode ssh_statemach_act(struct Curl_easy *data, bool *block)
 
       Curl_safefree(sshc->rsa_pub);
       Curl_safefree(sshc->rsa);
-
       Curl_safefree(sshc->quote_path1);
       Curl_safefree(sshc->quote_path2);
-
       Curl_safefree(sshc->homedir);
-      Curl_safefree(sshc->readdir_line);
 
       /* the code we are about to return */
       result = sshc->actualcode;
index 7c25555076e2b84a7529932feeed224196865fd5..79786eb6cc2bf38808a96ee4ae9eba34689ad454 100644 (file)
@@ -147,7 +147,6 @@ struct ssh_conn {
 
   char *homedir;              /* when doing SFTP we figure out home dir in the
                                  connect phase */
-  char *readdir_line;
   /* end of READDIR stuff */
 
   int secondCreateDirs;         /* counter use by the code to see if the
@@ -159,6 +158,7 @@ struct ssh_conn {
 #if defined(USE_LIBSSH)
   char *readdir_linkPath;
   size_t readdir_len, readdir_totalLen, readdir_currLen;
+  char *readdir_line;
 /* our variables */
   unsigned kbd_state; /* 0 or 1 */
   ssh_key privkey;