mirror of
https://github.com/curl/curl.git
synced 2026-08-02 04:20:28 +03:00
Fixed a TFTP memory leak. Enabled test 2003 to verify this.
This commit is contained in:
parent
65ed696625
commit
91e27ce755
4 changed files with 11 additions and 3 deletions
|
|
@ -605,9 +605,13 @@ static CURLcode tftp_state_machine(tftp_state_data_t *state,
|
|||
static CURLcode Curl_tftp_connect(struct connectdata *conn, bool *done)
|
||||
{
|
||||
CURLcode code;
|
||||
tftp_state_data_t *state;
|
||||
tftp_state_data_t *state;
|
||||
int rc;
|
||||
|
||||
/* If there already is a protocol-specific struct allocated for this
|
||||
sessionhandle, deal with it */
|
||||
Curl_reset_reqproto(conn);
|
||||
|
||||
state = conn->data->reqdata.proto.tftp = calloc(sizeof(tftp_state_data_t),
|
||||
1);
|
||||
if(!state)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue