Thanks. This solves the segfault bug.

But I wonder how those pointers get freed. Memory leak might be a problem
if a multi handle is used to drive millions of easy handle.


Best,
glf

On Thu, Jun 30, 2016 at 5:15 AM, Daniel Stenberg <[email protected]> wrote:

> On Wed, 29 Jun 2016, Gou Lingfeng wrote:
>
> My guess is that connections and session handles highly depend on one
>> another (connection and disconnection need session data), but connection
>> reusing needs some independence of connections.
>>
>
> I think you're right - and thanks a bunch for your excellent analysis and
> step by step description. It really made me understand the issue.
>
> I think the freeing of the 'req.protop' in the disconnect function is
> totally wrong. The connection gets disconnected, it should not clear data
> in the easy handle just because of that.
>
> See attachment for my suggested fix. I believe the free'ing should've been
> removed before already, we have just been lucky (or perhaps unlucky) that
> nobody else ran into this problem (or at least reported it) before.
>
> --
>
>  / daniel.haxx.se
> -------------------------------------------------------------------
> List admin: https://cool.haxx.se/list/listinfo/curl-library
> Etiquette:  https://curl.haxx.se/mail/etiquette.html
>
-------------------------------------------------------------------
List admin: https://cool.haxx.se/list/listinfo/curl-library
Etiquette:  https://curl.haxx.se/mail/etiquette.html

Reply via email to