mirror of
https://github.com/curl/curl.git
synced 2026-05-30 16:07:28 +03:00
fix the check
This commit is contained in:
parent
91e27ce755
commit
9dbc2c827d
1 changed files with 6 additions and 4 deletions
10
lib/tftp.c
10
lib/tftp.c
|
|
@ -612,10 +612,12 @@ static CURLcode Curl_tftp_connect(struct connectdata *conn, bool *done)
|
|||
sessionhandle, deal with it */
|
||||
Curl_reset_reqproto(conn);
|
||||
|
||||
state = conn->data->reqdata.proto.tftp = calloc(sizeof(tftp_state_data_t),
|
||||
1);
|
||||
if(!state)
|
||||
return CURLE_OUT_OF_MEMORY;
|
||||
if(!(state = conn->data->reqdata.proto.tftp)) {
|
||||
state = conn->data->reqdata.proto.tftp = calloc(sizeof(tftp_state_data_t),
|
||||
1);
|
||||
if(!state)
|
||||
return CURLE_OUT_OF_MEMORY;
|
||||
}
|
||||
|
||||
conn->bits.close = FALSE; /* keep it open if possible */
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue