Page MenuHomeFreeBSD

loader.efi: find_currdev() can leak memory
ClosedPublic

Authored by tsoome on Jan 15 2017, 7:31 PM.
Tags
None
Referenced Files
Unknown Object (File)
Dec 20 2023, 4:21 AM
Unknown Object (File)
Nov 13 2023, 9:51 PM
Unknown Object (File)
Oct 12 2023, 8:01 AM
Unknown Object (File)
Sep 30 2023, 7:27 PM
Unknown Object (File)
May 30 2023, 12:14 PM
Unknown Object (File)
Jan 13 2023, 10:45 PM
Unknown Object (File)
Dec 28 2022, 12:10 PM
Unknown Object (File)
Dec 20 2022, 1:29 PM
Subscribers
None

Details

Summary

The find_currdev() is using variable "copy" to store the reference to trimmed devpath pointer,
if for some reason the efi_devpath_handle() fails, we will leak this copy.

Also we can simplify the code there a bit.

Test Plan

build and boot

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

tsoome retitled this revision from to loader.efi: find_currdev() can leak memory.
tsoome updated this object.
tsoome edited the test plan for this revision. (Show Details)
tsoome added reviewers: allanjude, imp.
allanjude edited edge metadata.

Approved for commit

This revision is now accepted and ready to land.Jan 15 2017, 7:40 PM
This revision was automatically updated to reflect the committed changes.