cl_utils: Fix memory leak.
This commit is contained in:
parent
815e09bb1b
commit
c5d0902d4c
|
@ -354,7 +354,7 @@ int cl_execute(BMP_CL_OPTIONS_t *opt)
|
||||||
target_reset(t);
|
target_reset(t);
|
||||||
} else {
|
} else {
|
||||||
#define WORKSIZE 1024
|
#define WORKSIZE 1024
|
||||||
uint8_t *data = malloc(WORKSIZE);
|
uint8_t *data = alloca(WORKSIZE);
|
||||||
if (!data) {
|
if (!data) {
|
||||||
printf("Can not malloc memory for flash read/verify operation\n");
|
printf("Can not malloc memory for flash read/verify operation\n");
|
||||||
return res;
|
return res;
|
||||||
|
|
Loading…
Reference in New Issue