Metabolix / HackBGRT

Windows boot logo changer for UEFI systems
MIT License
2.22k stars 239 forks source link

I think This location needs a FreePool(bmp) . When BMP structure is invalid . #152

Closed FREEWING-JP closed 10 months ago

FREEWING-JP commented 10 months ago

I think This location needs a FreePool(bmp) . When BMP structure is invalid .

https://github.com/Metabolix/HackBGRT/blob/da9909bbdd00d39089c804af95e5d0976835f7f7/src/main.c#L248-L254

as below

        }
        FreePool(bmp);  <<< Add This
        Print(L"HackBGRT: Invalid BMP (%s)!\n", path);
    } else {
Metabolix commented 10 months ago

Fixed in version 2.2.0, although the memory is probably freed anyways at some point during boot.