On 03/16/2018 03:40 PM, José Bollo wrote: > 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 <[email protected]> >>> 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.
Yep, that's why it was a bug ;-). > 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 Eh, the MHD_VERSION is already on 0x00095902, and yes, it should be safe to teset for that increase. > - 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. This is not possible with the current API.
signature.asc
Description: OpenPGP digital signature
