diff --git a/src/patch/patch.c b/src/patch/patch.c index 3ea55d5d..83c3e3f1 100644 --- a/src/patch/patch.c +++ b/src/patch/patch.c @@ -73,6 +73,7 @@ void release_load_info(struct load_info *info) free(info->str_build_id); info->str_build_id = NULL; } + if (info->ulp_name) { free(info->ulp_name); info->ulp_name = NULL; @@ -890,6 +891,7 @@ int init_patch(struct task_struct *task, const char *obj_file) struct load_info info = { .target_task = task, + .str_build_id = NULL, }; if (!(task->fto_flag & FTO_PROC)) { diff --git a/src/ulpatch.c b/src/ulpatch.c index db1f331f..557b41bb 100644 --- a/src/ulpatch.c +++ b/src/ulpatch.c @@ -127,7 +127,7 @@ static int parse_config(int argc, char *argv[]) int check_patch_file(const char *file) { int err = 0; - struct load_info info; + struct load_info info = {0}; if (!file) return -EEXIST;