Gracefully exit.

This commit is contained in:
Wesley Castro 2018-08-12 18:21:37 -07:00
parent 1899debbd0
commit 9d84d76855
1 changed files with 3 additions and 0 deletions

View File

@ -152,6 +152,9 @@ int main(int argc, char *argv[])
if(!tcbFile)
{
printf("Error opening %s.\n", tcbPath);
free(tcbData);
free(imageData.rgba);
return EXIT_FAILURE;
}
fwrite(tcbData, 1, tcbLength, tcbFile);