-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
url: call protocol handler's disconnect in Curl_conn_free
For the case when the connection struct is all setup, the protocol handler allocates data in its setup_connection function, but the connection struct is discarded again before used further because a connection reuse is prefered. Then the handler's disconnect function was not previously called, which then would lead to a memory leak. I added test case 698 that reproduces the leak and the fix. Reported-by: Philippe Antoine Closes curl#16604
- Loading branch information
Showing
3 changed files
with
63 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
<testcase> | ||
<info> | ||
<keywords> | ||
FTP | ||
ACCT | ||
</keywords> | ||
</info> | ||
# Server-side | ||
<reply> | ||
<data> | ||
data | ||
to | ||
see | ||
that FTP | ||
works | ||
so does it? | ||
</data> | ||
<servercmd> | ||
REPLY PASS 332 please provide account name | ||
REPLY ACCT 230 thank you | ||
</servercmd> | ||
</reply> | ||
|
||
# Client-side | ||
<client> | ||
<server> | ||
ftp | ||
</server> | ||
<name> | ||
FTP with ACCT and connection reuse | ||
</name> | ||
<command> | ||
ftp://%HOSTIP:%FTPPORT/%TESTNUMBER --ftp-account "one count" ftp://%HOSTIP:%FTPPORT/%TESTNUMBER | ||
</command> | ||
</client> | ||
|
||
|
||
# Verify data after the test has been "shot" | ||
<verify> | ||
<strip> | ||
QUIT | ||
</strip> | ||
<protocol> | ||
USER anonymous | ||
PASS [email protected] | ||
ACCT one count | ||
PWD | ||
EPSV | ||
TYPE I | ||
SIZE %TESTNUMBER | ||
RETR %TESTNUMBER | ||
EPSV | ||
SIZE %TESTNUMBER | ||
RETR %TESTNUMBER | ||
QUIT | ||
</protocol> | ||
</verify> | ||
</testcase> |