src/bin/jpwl/convert.c: fix memleak (fix suggested by maddin200, #631)
This commit is contained in:
parent
51eb86d8f7
commit
517bf6fd86
|
@ -129,6 +129,7 @@ static int tga_readheader(FILE *fp, unsigned int *bits_per_pixel,
|
||||||
if (fread(tga, TGA_HEADER_SIZE, 1, fp) != 1) {
|
if (fread(tga, TGA_HEADER_SIZE, 1, fp) != 1) {
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
"\nError: fread return a number of element different from the expected.\n");
|
"\nError: fread return a number of element different from the expected.\n");
|
||||||
|
free(tga);
|
||||||
return 0 ;
|
return 0 ;
|
||||||
}
|
}
|
||||||
id_len = (unsigned char)tga[0];
|
id_len = (unsigned char)tga[0];
|
||||||
|
|
Loading…
Reference in New Issue