Fix two resource leaks
Signed-off-by: Nikola Forró <nforro@redhat.com>
This commit is contained in:
parent
99b10edde9
commit
2f694198f1
@ -283,6 +283,8 @@ main(int argc, char* argv[])
|
|||||||
if (TIFFWriteScanline(out, buf, row, 0) < 0)
|
if (TIFFWriteScanline(out, buf, row, 0) < 0)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
if (in != stdin)
|
||||||
|
fclose(in);
|
||||||
(void) TIFFClose(out);
|
(void) TIFFClose(out);
|
||||||
if (buf)
|
if (buf)
|
||||||
_TIFFfree(buf);
|
_TIFFfree(buf);
|
||||||
|
@ -3020,6 +3020,7 @@ tsize_t t2p_readwrite_pdf_image_tile(T2P* t2p, TIFF* input, TIFF* output, ttile_
|
|||||||
"for t2p_readwrite_pdf_image_tile, %s",
|
"for t2p_readwrite_pdf_image_tile, %s",
|
||||||
(unsigned long) t2p->tiff_datasize,
|
(unsigned long) t2p->tiff_datasize,
|
||||||
TIFFFileName(input));
|
TIFFFileName(input));
|
||||||
|
_TIFFfree(buffer);
|
||||||
t2p->t2p_error = T2P_ERR_ERROR;
|
t2p->t2p_error = T2P_ERR_ERROR;
|
||||||
return(0);
|
return(0);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user