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)
Fri, Nov 21, 3:48 AM
Unknown Object (File)
Fri, Nov 21, 3:44 AM
Unknown Object (File)
Fri, Nov 21, 3:43 AM
Unknown Object (File)
Fri, Nov 21, 3:41 AM
Unknown Object (File)
Wed, Nov 19, 2:40 AM
Unknown Object (File)
Tue, Nov 18, 11:19 AM
Unknown Object (File)
Thu, Nov 13, 2:38 AM
Unknown Object (File)
Mon, Nov 10, 11:43 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 Passed
Unit
No Test Coverage
Build Status
Buildable 6788
Build 6999: arc lint + arc unit

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.