Implement xml export / import #3

Merged
mhu merged 20 commits from xml-export into master 2023-01-06 18:50:08 +01:00
Showing only changes of commit 598394cc2d - Show all commits

View File

@ -394,7 +394,7 @@ int main(int argc, char **argv)
struct command_line_options cmd_opts; struct command_line_options cmd_opts;
elfpatch_handle_t *ep; elfpatch_handle_t *ep;
int ret = 0; int ret = 0;
uint32_t *crcs; uint32_t *crcs = NULL;
xml_init(); xml_init();
@ -484,10 +484,12 @@ int main(int argc, char **argv)
ret_close_elf: ret_close_elf:
elf_patch_close_and_free(ep); elf_patch_close_and_free(ep);
/* Free the CRCs. This is not strictly necessary... */
free(crcs);
free_cmds: free_cmds:
free_cmd_args(&cmd_opts); free_cmd_args(&cmd_opts);
/* Free CRCs if necessary */
if (crcs)
free(crcs);
return ret; return ret;
} }