Add missing fclose() statement in error condition.
This commit is contained in:
parent
53d265576a
commit
10d22ec26d
|
@ -737,6 +737,7 @@ opj_image_t* bmptoimage(const char *filename, opj_cparameters_t *parameters)
|
||||||
|
|
||||||
if (fread(RGB, sizeof(unsigned char), (3 * W + PAD) * H,
|
if (fread(RGB, sizeof(unsigned char), (3 * W + PAD) * H,
|
||||||
IN) != (3 * W + PAD) * H) {
|
IN) != (3 * W + PAD) * H) {
|
||||||
|
fclose(IN);
|
||||||
free(RGB);
|
free(RGB);
|
||||||
opj_image_destroy(image);
|
opj_image_destroy(image);
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
|
|
Loading…
Reference in New Issue