edk2/MdePkg
Qihang Gao fa461abf8a MdePkg/UefiDevicePathLib: Fix the potential memory leak issue
The function DevPathToTextUsbWWID() allocates NewStr when the input
SerialNumber lacks a null terminator. However, this allocated memory
is never freed after use, resulting in a memory leak.

This patch adds the missing FreePool() for NewStr before the function
returns, ensuring that the allocated buffer is properly freed and
eliminating the potential leak.

Signed-off-by: Qihang Gao <gaoqihang@loongson.cn>
2026-07-17 09:45:38 +00:00
..
Include MdePkg: SMBIOS: add RiscV processor specific block structure 2026-07-09 14:13:22 +00:00
Library MdePkg/UefiDevicePathLib: Fix the potential memory leak issue 2026-07-17 09:45:38 +00:00
Test MdePkg: added mock for InstallConfigurationTable 2026-07-16 02:33:17 +00:00
MdeLibs.dsc.inc MdePkg: CompilerIntrinsicsLib: Add RiscV64 support 2026-06-24 14:49:50 +00:00
MdePkg.ci.yaml MdePkg: Add constants for HMAT structures' fields 2026-07-06 07:39:54 +00:00
MdePkg.dec MdePkg: Introduce DT_FIXUP protocol 2026-06-11 15:33:20 +00:00
MdePkg.dsc MdePkg: CompilerIntrinsicsLib: Add RiscV64 support 2026-06-24 14:49:50 +00:00
MdePkg.uni MdePkg: Remove UGA support 2025-07-08 15:42:03 +00:00
MdePkgExtra.uni MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00