Skip to content

Fix a memory leak in TIFFStreamOpen

Paul Kehrer requested to merge reaperhulk/libtiff:dont-leak-stream-open into master

TIFFStreamOpen allocates a new tiff{o,i}s_data, but if TIFFClientOpen fails then that struct is leaked. Delete it if the returned TIFF * is null.

This appears to be correct but I'm unfamiliar with the libtiff codebase so if I have made a mistake please let me know and I'll fix it!

Edited by Paul Kehrer

Merge request reports