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)
Wed, Oct 15, 2:49 PM
Unknown Object (File)
Tue, Sep 23, 5:36 PM
Unknown Object (File)
Sep 18 2025, 6:06 AM
Unknown Object (File)
Sep 14 2025, 9:04 PM
Unknown Object (File)
Sep 14 2025, 8:19 PM
Unknown Object (File)
Sep 14 2025, 9:50 AM
Unknown Object (File)
Aug 21 2025, 6:32 AM
Unknown Object (File)
Jul 20 2025, 6:25 AM
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.