Page MenuHomeFreeBSD

libutil: fix memory leak in login_cap
Needs ReviewPublic

Authored by khng on Jan 5 2026, 2:48 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Jan 29, 1:06 AM
Unknown Object (File)
Sat, Jan 24, 4:43 AM
Unknown Object (File)
Mon, Jan 19, 7:33 PM
Unknown Object (File)
Sun, Jan 18, 9:33 AM
Unknown Object (File)
Thu, Jan 15, 11:08 AM
Unknown Object (File)
Tue, Jan 13, 11:17 PM
Unknown Object (File)
Tue, Jan 13, 1:06 AM
Unknown Object (File)
Mon, Jan 12, 12:04 AM
Subscribers

Details

Reviewers
des
olce
Summary

cgetstr() allocates memory to the string and sends it back to
the caller. Caller of cgetstr() is supposed to free that memory.

Sponsored by: Hewlett Packard Enterprise
MFC after: 3 days

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 69625
Build 66508: arc lint + arc unit

Event Timeline

khng requested review of this revision.Jan 5 2026, 2:48 PM

Your use of “Obtained from” is incorrect, unless “Hewlett Packard Enterprise” is the name of a piece of open-source software I've never heard of that has a copy of our libutil and already had this patch. You probably want to use “Sponsored by” instead.

In D54526#1246414, @des wrote:

Your use of “Obtained from” is incorrect, unless “Hewlett Packard Enterprise” is the name of a piece of open-source software I've never heard of that has a copy of our libutil and already had this patch. You probably want to use “Sponsored by” instead.

I just changed it to "Sponsored by:".