X-Git-Url: http://git.code-monkey.de/?a=blobdiff_plain;f=src%2Fssli_polarssl.c;h=a36ccb6157aeb13a4d0624410abd932f79ae25e2;hb=24739fe6c0e0ae925077a28914f5a2e3fd6c5a9a;hp=b553f796cee0e2c73f6451838268eb54cf4af3c0;hpb=c289fc55d1fce7f474127933063ba2008a188259;p=umurmur.git diff --git a/src/ssli_polarssl.c b/src/ssli_polarssl.c index b553f79..a36ccb6 100644 --- a/src/ssli_polarssl.c +++ b/src/ssli_polarssl.c @@ -28,17 +28,12 @@ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include -#include -#include - #include "conf.h" #include "log.h" #include "ssl.h" -/* - * PolarSSL interface - */ +#include +#include #include #include @@ -270,12 +265,10 @@ SSL_handle_t *SSLi_newconnection(int *fd, bool_t *SSLready) ssl_session *ssn; int rc; - ssl = malloc(sizeof(ssl_context)); - ssn = malloc(sizeof(ssl_session)); + ssl = calloc(1, sizeof(ssl_context)); + ssn = calloc(1, sizeof(ssl_session)); if (!ssl || !ssn) Log_fatal("Out of memory"); - memset(ssl, 0, sizeof(ssl_context)); - memset(ssn, 0, sizeof(ssl_session)); rc = ssl_init(ssl); if (rc != 0 )