From c5d0902d4ce98b0c18bd3d57e030e9c4f934ae1b Mon Sep 17 00:00:00 2001 From: Uwe Bonnes Date: Wed, 22 Apr 2020 18:18:22 +0200 Subject: [PATCH] cl_utils: Fix memory leak. --- src/platforms/pc/cl_utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/platforms/pc/cl_utils.c b/src/platforms/pc/cl_utils.c index ece6e6b9..2a73c64e 100644 --- a/src/platforms/pc/cl_utils.c +++ b/src/platforms/pc/cl_utils.c @@ -354,7 +354,7 @@ int cl_execute(BMP_CL_OPTIONS_t *opt) target_reset(t); } else { #define WORKSIZE 1024 - uint8_t *data = malloc(WORKSIZE); + uint8_t *data = alloca(WORKSIZE); if (!data) { printf("Can not malloc memory for flash read/verify operation\n"); return res;