gen_offset_header: resources leak in pTable
Fixed resources leak in pTable when the lseek command fails. Change-Id: I414276399b0d0ca3dee0c18d307ccc2035d66198 Signed-off-by: Javier B Perez <javier.b.perez.hernandez@intel.com>
This commit is contained in:
parent
2a4d461773
commit
908926ce36
1 changed files with 1 additions and 0 deletions
|
@ -436,6 +436,7 @@ static int strTblLoad(int fd, unsigned strTblIx, char **ppStringTable)
|
|||
}
|
||||
|
||||
if (lseek(fd, shdr[strTblIx].sh_offset, SEEK_SET) == -1) {
|
||||
free(pTable);
|
||||
fprintf(stderr, "Unable to seek\n");
|
||||
return -1;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue