You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Starting a netcat command nc -l -p 12345 in order to read HTTP request without answering, running the previous sample under valgrind report the following memory leak :
==7666== 495 (32 direct, 463 indirect) bytes in 1 blocks are definitely lost in loss record 602 of 641
==7666== at 0x4C29F90: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==7666== by 0x4073BC: AddFormData (in /mnt/DOWNLOAD/curl/docs/examples/postit2)
==7666== by 0x4075BF: AddFormDataf (in /mnt/DOWNLOAD/curl/docs/examples/postit2)
==7666== by 0x40860D: Curl_getformdata (in /mnt/DOWNLOAD/curl/docs/examples/postit2)
==7666== by 0x419F99: Curl_http (in /mnt/DOWNLOAD/curl/docs/examples/postit2)
==7666== by 0x4253FA: Curl_do (in /mnt/DOWNLOAD/curl/docs/examples/postit2)
==7666== by 0x4102CE: multi_runsingle (in /mnt/DOWNLOAD/curl/docs/examples/postit2)
==7666== by 0x4109BC: curl_multi_perform (in /mnt/DOWNLOAD/curl/docs/examples/postit2)
==7666== by 0x40BB0A: curl_easy_perform (in /mnt/DOWNLOAD/curl/docs/examples/postit2)
==7666== by 0x40714E: main (in /mnt/DOWNLOAD/curl/docs/examples/postit2)
Investigating show that this was introduced by the commit 1342a96. There is no leak with curl-7_39_0, and there is a leak with curl-7_40_0.
A possible fix seems to add in lib/multi.c line 1019 (in order to free what allocate Curl_getformdata) :
1018 result = CURLE_OPERATION_TIMEDOUT;
1019 (void)Curl_done(&data->easy_conn, data->result, TRUE);
1020 /* Skip the statemachine and go directly to error handling section. */
1021 goto statemachine_end;
The text was updated successfully, but these errors were encountered:
Since 1342a96, a timeout detected in the multi state machine didn't
necesarily clear everything up, like formpost data.
Bug: #147
Reported-by: Michel Promonet
Patched-by: Michel Promonet
Using a simple example based on postit2.c :
Starting a netcat command
nc -l -p 12345
in order to read HTTP request without answering, running the previous sample under valgrind report the following memory leak :Investigating show that this was introduced by the commit 1342a96. There is no leak with curl-7_39_0, and there is a leak with curl-7_40_0.
A possible fix seems to add in lib/multi.c line 1019 (in order to free what allocate Curl_getformdata) :
The text was updated successfully, but these errors were encountered: