diff options
author | Timothy Lyanguzov <timothy.lyanguzov@sap.com> | 2021-06-02 16:23:47 +1200 |
---|---|---|
committer | Timothy Lyanguzov <timothy.lyanguzov@sap.com> | 2021-06-02 16:23:47 +1200 |
commit | 0bb2247ec49cb48cd93db11d6b5e8efa638f4888 (patch) | |
tree | d02096326b1251e467814136ab699205890bc123 /tools/tiff2pdf.c | |
parent | 5d039cf47c1f7c91be2f2932a15b1ba4a4cfdf9c (diff) | |
download | libtiff-git-0bb2247ec49cb48cd93db11d6b5e8efa638f4888.tar.gz |
Fix memory leak in tiff2pdf
Diffstat (limited to 'tools/tiff2pdf.c')
-rw-r--r-- | tools/tiff2pdf.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/tiff2pdf.c b/tools/tiff2pdf.c index be051c5a..99c2cc8e 100644 --- a/tools/tiff2pdf.c +++ b/tools/tiff2pdf.c @@ -2583,7 +2583,7 @@ tsize_t t2p_readwrite_pdf_image(T2P* t2p, TIFF* input, TIFF* output){ t2p->tiff_datasize, TIFFFileName(input)); t2p->t2p_error = T2P_ERR_ERROR; - _TIFFfree(buffer); + _TIFFfree(buffer); return(0); } for(i=0;i<stripcount;i++){ @@ -2599,8 +2599,9 @@ tsize_t t2p_readwrite_pdf_image(T2P* t2p, TIFF* input, TIFF* output){ "Error on decoding strip %"PRIu32" of %s", i + j*stripcount, TIFFFileName(input)); - _TIFFfree(buffer); t2p->t2p_error=T2P_ERR_ERROR; + _TIFFfree(samplebuffer); + _TIFFfree(buffer); return(0); } samplebufferoffset+=read; |