From b6f392215225a9aae9d257551505c169ac23e9ef Mon Sep 17 00:00:00 2001 From: Armin Novak Date: Mon, 7 Sep 2020 11:48:06 +0200 Subject: [PATCH] Fixed primitives test --- libfreerdp/primitives/primitives.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libfreerdp/primitives/primitives.c b/libfreerdp/primitives/primitives.c index 042626c43..a1cd7ea85 100644 --- a/libfreerdp/primitives/primitives.c +++ b/libfreerdp/primitives/primitives.c @@ -147,13 +147,13 @@ static primitives_YUV_benchmark* primitives_YUV_benchmark_init(primitives_YUV_be ret->outputStride = roi->width * 4; ret->testedFormat = PIXEL_FORMAT_BGRA32; - ret->outputBuffer = malloc(ret->outputStride * roi->height); + ret->outputBuffer = calloc(ret->outputStride, roi->height); if (!ret->outputBuffer) goto fail; for (i = 0; i < 3; i++) { - BYTE* buf = ret->channels[i] = malloc(roi->width * roi->height); + BYTE* buf = ret->channels[i] = calloc(roi->width, roi->height); if (!buf) goto fail; @@ -172,7 +172,7 @@ static BOOL primitives_YUV_benchmark_run(primitives_YUV_benchmark* bench, primit UINT64 runTime, UINT32* computations) { ULONGLONG dueDate; - const BYTE* channels[3]; + const BYTE* channels[3] = { 0 }; size_t i; pstatus_t status;