Merge pull request #1047 from stweil/coverity
Fix resource leak (CID 179466)
This commit is contained in:
commit
bdcead70d5
|
@ -1416,6 +1416,9 @@ int imagetopgx(opj_image_t * image, const char *outfile)
|
||||||
unsigned char* line_buffer = malloc((size_t)w);
|
unsigned char* line_buffer = malloc((size_t)w);
|
||||||
if (line_buffer == NULL) {
|
if (line_buffer == NULL) {
|
||||||
fprintf(stderr, "Out of memory");
|
fprintf(stderr, "Out of memory");
|
||||||
|
if (total > 256) {
|
||||||
|
free(name);
|
||||||
|
}
|
||||||
goto fin;
|
goto fin;
|
||||||
}
|
}
|
||||||
for (j = 0; j < h; j++) {
|
for (j = 0; j < h; j++) {
|
||||||
|
|
Loading…
Reference in New Issue