diff options
author | Daniel Stenberg <daniel@haxx.se> | 2007-10-25 07:47:38 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2007-10-25 07:47:38 +0000 |
commit | 91e27ce755a2dbf8084517fb4ec441a260ffee84 (patch) | |
tree | 6e087dc099dc6933e482d2cda2793c482c895fac /lib | |
parent | 65ed69662513b14143e8821c72ea41d7c69113d9 (diff) |
Fixed a TFTP memory leak. Enabled test 2003 to verify this.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/tftp.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/tftp.c b/lib/tftp.c index ba7842280..041a5f340 100644 --- a/lib/tftp.c +++ b/lib/tftp.c @@ -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) |