QTiffHandler: close() also corrupt files early
Every other early return in read() does
d->close();
return false;
except the "Corrupt image" one. While the file will eventually be
closed by the dtor, the asymmetry is raising eyebrows and can delay
freeing resources, so restore the class' former "failed read → handle
closed" invariant.
Expand the comment a bit to ensure readers understand why this check
is up-front.
Amends 4f83c3ebfdb2bc97162ac1065091c195b60ff5fb (picked to 5.15).
Picking all the way as a fixup to QTBUG-107223, which has a
SecurityIssue label.
Task-number: QTBUG-107223
Pick-to: 6.12 6.11 6.8 6.5 5.15
Change-Id: I900d327f2e8d68241dc658d1b3c32cbc7687e42b
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>