From bd1bb3252c87bdf05addb912201ef3b3c6f54d66 Mon Sep 17 00:00:00 2001 From: bmax Date: Thu, 7 Mar 2024 17:52:37 +0800 Subject: [PATCH] a --- tools/patch.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/patch.c b/tools/patch.c index 10cf8a53..21599100 100644 --- a/tools/patch.c +++ b/tools/patch.c @@ -327,8 +327,9 @@ int patch_update_img(const char *kimg_path, const char *kpimg_path, const char * patch_extra_item_t *item = NULL; if (config->is_path) { - patch_extra_item_t _item = { 0 }; - item = &_item; + // todo: free + item = (patch_extra_item_t *)malloc(sizeof(patch_extra_item_t)); + memset(item, 0, sizeof(patch_extra_item_t)); const char *path = config->path; char *data; int len = 0;