]> granicus.if.org Git - curl/commitdiff
Curl_scp_done() needs to call libssh2_channel_free() to prevent a
authorJames Housley <jim@thehousleys.net>
Fri, 8 Jun 2007 16:19:21 +0000 (16:19 +0000)
committerJames Housley <jim@thehousleys.net>
Fri, 8 Jun 2007 16:19:21 +0000 (16:19 +0000)
memory leak, and it is the right thing to do.

lib/ssh.c

index 184a74b6943f15203ef2186a63bb27fc8f73caea..bb8f513b50a51dff14d1a1fa36e15abb7aba24f7 100644 (file)
--- a/lib/ssh.c
+++ b/lib/ssh.c
@@ -755,6 +755,7 @@ CURLcode Curl_scp_done(struct connectdata *conn, CURLcode status,
       infof(conn->data, "Failed to stop libssh2 channel subsystem\n");
     }
 #endif /* !(LIBSSH2_APINO >= 200706012030) */
+    libssh2_channel_free(scp->ssh_channel);
   }
 
   if (scp->ssh_session) {