]> granicus.if.org Git - curl/commit
SSL: Avoid magic allocation of SSL backend specific data
authorJohannes Schindelin <johannes.schindelin@gmx.de>
Tue, 28 Nov 2017 00:21:59 +0000 (01:21 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Fri, 1 Dec 2017 09:28:31 +0000 (10:28 +0100)
commit9194a9959bedeeb54d935ddf9d49361ead5f922a
tree1ff879d705064c1f84cd7e717edb48e505c69672
parent744ee58386c41f487a8f62d5ce3f77a12b30ec9c
SSL: Avoid magic allocation of SSL backend specific data

Originally, my idea was to allocate the two structures (or more
precisely, the connectdata structure and the four SSL backend-specific
strucutres required for ssl[0..1] and proxy_ssl[0..1]) in one go, so
that they all could be free()d together.

However, getting the alignment right is tricky. Too tricky.

So let's just bite the bullet and allocate the SSL backend-specific
data separately.

As a consequence, we now have to be very careful to release the memory
allocated for the SSL backend-specific data whenever we release any
connectdata.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Closes #2119
lib/url.c
lib/urldata.h