msasn1: Fix buffer allocations.

Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Piotr Caban 2020-09-18 14:30:23 +02:00 committed by Alexandre Julliard
parent 2eed0cdb8f
commit d101fdb449
1 changed files with 3 additions and 3 deletions

View File

@ -56,7 +56,7 @@ ASN1module_t WINAPI ASN1_CreateModule(ASN1uint32_t ver, ASN1encodingrule_e rule,
if (!encoder || !decoder || !freemem || !size)
return module;
module = heap_alloc(sizeof(module));
module = heap_alloc(sizeof(*module));
if (module)
{
module->nModuleName = magic;
@ -103,7 +103,7 @@ ASN1error_e WINAPI ASN1_CreateEncoder(ASN1module_t module, ASN1encoding_t *encod
if (!module || !encoder)
return ASN1_ERR_BADARGS;
enc = heap_alloc(sizeof(enc));
enc = heap_alloc(sizeof(*enc));
if (!enc)
{
return ASN1_ERR_MEMORY;
@ -153,7 +153,7 @@ ASN1error_e WINAPI ASN1_CreateDecoder(ASN1module_t module, ASN1decoding_t *decod
if (!module || !decoder)
return ASN1_ERR_BADARGS;
dec = heap_alloc(sizeof(dec));
dec = heap_alloc(sizeof(*dec));
if (!dec)
{
return ASN1_ERR_MEMORY;