dm: close filepointer before exiting acrn_load_elf()

In acrn_load_elf(), file pointer 'fp' is kept in
 open state before exiting if 'load_elf32()' is executed,
 this patch is to fix this bug.

Tracked-On: #3817
Signed-off-by: Yonghua Huang <yonghua.huang@intel.com>
This commit is contained in:
Yonghua Huang 2019-10-15 11:52:06 +08:00 committed by ACRN System Integration
parent b5f77c0769
commit d8deaa4b16
1 changed files with 1 additions and 0 deletions

View File

@ -243,6 +243,7 @@ acrn_load_elf(struct vmctx *ctx, char *elf_file_name, unsigned long *entry,
}
*entry = elf_ehdr->e_entry;
fclose(fp);
free(elf_buf);
return ret;