Hi all,

I searched last two days a "double free" bug that appeared using latest
master for my implementation of websockets using MHD upgrade "facility".

After bisecting, it appears that the commit 

>> commit 0ebdff94d461abd4328cf45a6281c15139a045eb
>> Author: Christian Grothoff <christ...@grothoff.org>
>> Date:   Fri Mar 2 21:45:17 2018 +0100
>> 
>>     fix test_upgrade transient failures (#5189)

introduces the change.

Before it, I had to free manually the resource attached to the
connection. After it, freeing it in the MHD_OPTION_NOTIFY_COMPLETED
callback "as usual" works (didn't work before). This lead in my code to
a dual free of resources.

For me using the callback of MHD_OPTION_NOTIFY_COMPLETED in all cases
(after upgrade or not) is produce the lightest code.

2 questions:

 - is it possible to increase the version to 0x00095901 for testing the
   case and adapt my code?

#define MHD_VERSION   0x00095901

 - in my case, the resource is not used and was released in the upgrade
   callback. Is there a way to force the con_cls of a connection? If
   yes I can release the resources earlier.

Best regards
José Bollo




Reply via email to