Fix resource leak, CID 1576007

This commit is contained in:
olszomal 2024-01-24 08:58:53 +01:00 committed by Michał Trojnara
parent f22c83514c
commit f3ac2c0c6f

1
msi.c
View File

@ -830,6 +830,7 @@ static PKCS7 *msi_pkcs7_get_digital_signature(FILE_FORMAT_CTX *ctx, MSI_ENTRY *d
p = OPENSSL_malloc((size_t)len); p = OPENSSL_malloc((size_t)len);
if (!msi_file_read(ctx->msi_ctx->msi, ds, 0, p, len)) { if (!msi_file_read(ctx->msi_ctx->msi, ds, 0, p, len)) {
printf("DigitalSignature stream data error\n"); printf("DigitalSignature stream data error\n");
OPENSSL_free(p);
return NULL; return NULL;
} }
blob = (u_char *)p; blob = (u_char *)p;