Fix SRP memory leaks
[openssl.git] / ssl / s3_lib.c
index 47d28e73ade27feb4476b255d28bab2e818abed9..bb090efc48d989e46857d64228fea4b37852dcf3 100644 (file)
@@ -3836,9 +3836,8 @@ int ssl3_new(SSL *s)
 {
     SSL3_STATE *s3;
 
-    if ((s3 = OPENSSL_malloc(sizeof(*s3))) == NULL)
+    if ((s3 = OPENSSL_zalloc(sizeof(*s3))) == NULL)
         goto err;
-    memset(s3, 0, sizeof(*s3));
     s->s3 = s3;
     
 #ifndef OPENSSL_NO_SRP