main: heap_adsp release fix

In image re-signing mode or if there are no input files, the memory
allocated for heap_adsp was not released.

Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
This commit is contained in:
Adrian Warecki 2023-02-16 16:50:57 +01:00 committed by pjdobrowolski
parent 3aa199fb07
commit 0931d9cc4b
1 changed files with 4 additions and 2 deletions

View File

@ -168,7 +168,8 @@ int main(int argc, char *argv[])
if (image.in_file) {
fprintf(stdout, "going to re-sign\n");
return resign_image(&image);
ret = resign_image(&image);
goto out;
}
/* set IMR Type and the PV bit in found machine definition */
@ -196,7 +197,8 @@ int main(int argc, char *argv[])
if (image.num_modules <= 0) {
fprintf(stderr,
"error: requires at least one ELF input module\n");
return -EINVAL;
ret = -EINVAL;
goto out;
}
/* getopt reorders argv[] */