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:
Javier B Perez 2016-06-23 12:26:38 -05:00 committed by Inaky Perez-Gonzalez
commit 908926ce36

View file

@ -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;
}