2015-03-07 10:19 GMT+01:00 Emeric Brun <[email protected]>:
> Hi Janusz,
>
>> + *sctl = calloc(1, sizeof(struct chunk));
>> + if (!*sctl)
>> + goto end;
>> + if (!chunk_dup(*sctl, &trash)) {
>
> * maybe here
If chunk_dup fails then the destination is not allocated, so I believe
it is not necessary.
>>
>> + free(*sctl);
>> + *sctl = NULL;
>> + goto end;
>> + }
>> +
>> + ret = ssl_sock_parse_sctl(*sctl);
>> + if (ret) {
>
> * and definitely here
Sure.
>> + free(*sctl);
>> + *sctl = NULL;
>> + goto end;
>> + }
>
> a call to chunk_destroy seems to be missing.
>
> For the rest, the patch has my approval.
I'll send updated patch shortly. I've changed this so that SCTL is
first parsed from trash and only then copied. Makes it a bit shorter.
--
Janusz Dziemidowicz