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)
|
||||
break;
|
||||
}
|
||||
if (in != stdin)
|
||||
fclose(in);
|
||||
(void) TIFFClose(out);
|
||||
if (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",
|
||||
(unsigned long) t2p->tiff_datasize,
|
||||
TIFFFileName(input));
|
||||
_TIFFfree(buffer);
|
||||
t2p->t2p_error = T2P_ERR_ERROR;
|
||||
return(0);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user