Use safer sizeof variant in malloc
[openssl.git] / crypto / evp / bio_ok.c
index eced061447c428e732511f25a05e2be49d89a69d..9a65a9de124b3e1cc52a9bceb1c8e1e3bc632637 100644 (file)
@@ -176,7 +176,7 @@ static int ok_new(BIO *bi)
 {
     BIO_OK_CTX *ctx;
 
-    ctx = OPENSSL_malloc(sizeof(BIO_OK_CTX));
+    ctx = OPENSSL_malloc(sizeof(*ctx));
     if (ctx == NULL)
         return (0);