Branch: refs/heads/master
  Home:   https://github.com/tianocore/edk2
  Commit: fa461abf8a51b09c965d15c0d65be704b8b00a19
      
https://github.com/tianocore/edk2/commit/fa461abf8a51b09c965d15c0d65be704b8b00a19
  Author: Qihang Gao <[email protected]>
  Date:   2026-07-17 (Fri, 17 Jul 2026)

  Changed paths:
    M MdePkg/Library/UefiDevicePathLib/DevicePathToText.c

  Log Message:
  -----------
  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 <[email protected]>


  Commit: 9fcb50d56cbec9e715024b5700cbbb318dcda742
      
https://github.com/tianocore/edk2/commit/9fcb50d56cbec9e715024b5700cbbb318dcda742
  Author: Qihang Gao <[email protected]>
  Date:   2026-07-17 (Fri, 17 Jul 2026)

  Changed paths:
    M MdePkg/Library/UefiDevicePathLib/DevicePathToText.c

  Log Message:
  -----------
  MdePkg/UefiDevicePathLib: Check allocated buffer before use

The allocated buffer NewStr should be checked if it's NULL to avoid
null pointer dereference.

Signed-off-by: Qihang Gao <[email protected]>


Compare: https://github.com/tianocore/edk2/compare/c70637de12e0...9fcb50d56cbe

To unsubscribe from these emails, change your notification settings at 
https://github.com/tianocore/edk2/settings/notifications


_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits

Reply via email to