Hi Janusz,
+ *sctl = calloc(1, sizeof(struct chunk));
+ if (!*sctl)
+ goto end;
+ if (!chunk_dup(*sctl, &trash)) {
* maybe here
+ free(*sctl);
+ *sctl = NULL;
+ goto end;
+ }
+
+ ret = ssl_sock_parse_sctl(*sctl);
+ if (ret) {
* and definitely here
+ free(*sctl); + *sctl = NULL; + goto end; + }
a call to chunk_destroy seems to be missing.
For the rest, the patch has my approval. R, Emeric

