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: #4085
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 wenlingz
parent 84c3ee21e4
commit b51b89807f

View File

@ -244,6 +244,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;