src/bin/jpwl/convert.c: fix memleak (fix suggested by maddin200, #631)

This commit is contained in:
Even Rouault 2017-07-29 21:11:23 +02:00
parent 51eb86d8f7
commit 517bf6fd86
1 changed files with 1 additions and 0 deletions

View File

@ -129,6 +129,7 @@ static int tga_readheader(FILE *fp, unsigned int *bits_per_pixel,
if (fread(tga, TGA_HEADER_SIZE, 1, fp) != 1) {
fprintf(stderr,
"\nError: fread return a number of element different from the expected.\n");
free(tga);
return 0 ;
}
id_len = (unsigned char)tga[0];