tianocore / edk2

EDK II
https://github.com/tianocore/tianocore.github.io/wiki/EDK-II
Other
4.42k stars 2.4k forks source link

MdeModulePkg/RamDiskDxe: fix memory leak. #5806

Open ghbaccount opened 1 month ago

ghbaccount commented 1 month ago

Description

I found this memory leak during code review. This a common type of a leak on error path.

How This Was Tested

No tests. A trivial memory leak issue.

Integration Instructions

N/A

leiflindholm commented 3 weeks ago

Thanks for this. I'm not the maintainer of this module, but the code change looks good to me. However, can you improve the commit message a bit? I've seen you do that better elsewhere :)

ghbaccount commented 3 weeks ago

Thanks for this. I'm not the maintainer of this module, but the code change looks good to me. However, can you improve the commit message a bit? I've seen you do that better elsewhere :)

I've changed the commit message, now it's clear about leak error path and possible size of a this leak :) Thanks!