Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
static int mem_init(BIO *bi, unsigned long flags)
{
- BIO_BUF_MEM *bb = OPENSSL_zalloc(sizeof(BIO_BUF_MEM));
+ BIO_BUF_MEM *bb = OPENSSL_zalloc(sizeof(*bb));
if (bb == NULL)
return(0);
if ((bb->buf = BUF_MEM_new_ex(flags)) == NULL)
return(0);
- if ((bb->readp = OPENSSL_zalloc(sizeof(BUF_MEM))) == NULL)
+ if ((bb->readp = OPENSSL_zalloc(sizeof(*bb->readp))) == NULL)
return(0);
*bb->readp = *bb->buf;
bi->shutdown = 1;