[1.5] remove obvious memory leak from applications
This commit is contained in:
parent
1dc6eddf1c
commit
8d8841c84f
3
CHANGES
3
CHANGES
|
@ -5,6 +5,9 @@ What's New for OpenJPEG
|
||||||
! : changed
|
! : changed
|
||||||
+ : added
|
+ : added
|
||||||
|
|
||||||
|
October 20, 2011
|
||||||
|
* [mickael] remove obvious memory leak from applications
|
||||||
|
|
||||||
October 19, 2011
|
October 19, 2011
|
||||||
* [mickael] backport rev 1013-1014 from trunk
|
* [mickael] backport rev 1013-1014 from trunk
|
||||||
|
|
||||||
|
|
|
@ -418,6 +418,7 @@ int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
free(src);
|
free(src);
|
||||||
fclose(fsrc);
|
fclose(fsrc);
|
||||||
|
fclose(fout);
|
||||||
fprintf(stderr, "\nERROR: fread return a number of element different from the expected.\n");
|
fprintf(stderr, "\nERROR: fread return a number of element different from the expected.\n");
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
@ -452,6 +453,8 @@ int main(int argc, char *argv[])
|
||||||
fprintf(stderr, "ERROR -> j2k_to_image: failed to decode image!\n");
|
fprintf(stderr, "ERROR -> j2k_to_image: failed to decode image!\n");
|
||||||
opj_destroy_decompress(dinfo);
|
opj_destroy_decompress(dinfo);
|
||||||
opj_cio_close(cio);
|
opj_cio_close(cio);
|
||||||
|
fclose(fout);
|
||||||
|
free(src);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
/* dump image */
|
/* dump image */
|
||||||
|
@ -499,6 +502,8 @@ int main(int argc, char *argv[])
|
||||||
fprintf(stderr, "ERROR -> j2k_to_image: failed to decode image!\n");
|
fprintf(stderr, "ERROR -> j2k_to_image: failed to decode image!\n");
|
||||||
opj_destroy_decompress(dinfo);
|
opj_destroy_decompress(dinfo);
|
||||||
opj_cio_close(cio);
|
opj_cio_close(cio);
|
||||||
|
fclose(fout);
|
||||||
|
free(src);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
/* dump image */
|
/* dump image */
|
||||||
|
@ -550,6 +555,8 @@ int main(int argc, char *argv[])
|
||||||
fprintf(stderr, "ERROR -> j2k_to_image: failed to decode image!\n");
|
fprintf(stderr, "ERROR -> j2k_to_image: failed to decode image!\n");
|
||||||
opj_destroy_decompress(dinfo);
|
opj_destroy_decompress(dinfo);
|
||||||
opj_cio_close(cio);
|
opj_cio_close(cio);
|
||||||
|
fclose(fout);
|
||||||
|
free(src);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -633,6 +633,7 @@ int main(int argc, char **argv) {
|
||||||
fprintf(stderr, "ERROR -> j2k_to_image: failed to decode image!\n");
|
fprintf(stderr, "ERROR -> j2k_to_image: failed to decode image!\n");
|
||||||
opj_destroy_decompress(dinfo);
|
opj_destroy_decompress(dinfo);
|
||||||
opj_cio_close(cio);
|
opj_cio_close(cio);
|
||||||
|
free(src);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -675,6 +676,7 @@ int main(int argc, char **argv) {
|
||||||
fprintf(stderr, "ERROR -> j2k_to_image: failed to decode image!\n");
|
fprintf(stderr, "ERROR -> j2k_to_image: failed to decode image!\n");
|
||||||
opj_destroy_decompress(dinfo);
|
opj_destroy_decompress(dinfo);
|
||||||
opj_cio_close(cio);
|
opj_cio_close(cio);
|
||||||
|
free(src);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -717,6 +719,7 @@ int main(int argc, char **argv) {
|
||||||
fprintf(stderr, "ERROR -> j2k_to_image: failed to decode image!\n");
|
fprintf(stderr, "ERROR -> j2k_to_image: failed to decode image!\n");
|
||||||
opj_destroy_decompress(dinfo);
|
opj_destroy_decompress(dinfo);
|
||||||
opj_cio_close(cio);
|
opj_cio_close(cio);
|
||||||
|
free(src);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue