On Tue Sep 10 12:08:06 2024 +0000, Jacek Caban wrote:
We'd still leak if `GetDIBits` fails. We could move setting it after `GetDIBits` call, but it's maybe easier to just duplicate `GetDIBits` call inside if-else statement.
Yes. I think the first variant is shorter, but it has an unnecessary assignment if info_size == sizeof(dib). The duplication of GetDIBits is clearer.