Page MenuHomeFreeBSD

loader.efi: find_currdev() can leak memory
ClosedPublic

Authored by tsoome on Jan 15 2017, 7:31 PM.
Tags
None
Referenced Files
F147374001: D9191.id24037.diff
Tue, Mar 10, 10:44 AM
Unknown Object (File)
Fri, Mar 6, 8:13 PM
Unknown Object (File)
Thu, Mar 5, 8:40 PM
Unknown Object (File)
Thu, Mar 5, 2:48 AM
Unknown Object (File)
Tue, Mar 3, 4:39 PM
Unknown Object (File)
Jan 28 2026, 2:15 AM
Unknown Object (File)
Jan 16 2026, 10:22 PM
Unknown Object (File)
Jan 16 2026, 7:27 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.