Page MenuHomeFreeBSD

Fix a memory leak with the variable logfname
AbandonedPublic

Authored by gad on Feb 16 2017, 5:24 PM.
Tags
None
Referenced Files
F81941525: D9637.id.diff
Tue, Apr 23, 12:59 PM
Unknown Object (File)
Thu, Apr 18, 11:18 AM
Unknown Object (File)
Fri, Mar 29, 7:02 PM
Unknown Object (File)
Feb 3 2024, 2:45 PM
Unknown Object (File)
Dec 20 2023, 8:29 AM
Unknown Object (File)
Oct 25 2023, 9:59 AM
Unknown Object (File)
Sep 15 2023, 6:01 AM
Unknown Object (File)
Jul 22 2023, 9:17 PM
Subscribers

Details

Summary

Fix a memory leak with the variable logfname. logfname was
alloc-ed with strdup but never freed. This problem was found with clang's
static analysis tool scan-build/scan-view

Test Plan

Run scan-build before and after, verify the problem is resolved.
Manual review use of pointer in source.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

trix_juniper.net retitled this revision from to Fix a memory leak with the variable logfname.
trix_juniper.net updated this object.
trix_juniper.net edited the test plan for this revision. (Show Details)
trix_juniper.net added reviewers: stevek, emaste.
trix_juniper.net set the repository for this revision to rS FreeBSD src repository - subversion.
gad added a subscriber: gad.

Many years ago I did some work on newsyslog. I could handle the review and commit of this update if that's okay with other reviewers.

In D9637#208228, @gad wrote:

I could handle the review and commit of this update if that's okay with other reviewers.

That's fine with me!

Ping @gad

I have a few weeks coming up where I won't be busy at work, so I should get to this.

So, I'm finally getting around to looking at this. The delay was that I didn't have a freebsd-12.current system running. And now that I have a current system to test changes on, it looks like this issue was solved back in revision 303449 by ed, Thu Jul 28 16:02:30 2016 UTC. See revision 303449

So this could be closed as "already fixed", except that I don't see how I could do that!

Sorry for the long delay.

gad edited reviewers, added: trix_juniper.net; removed: gad.

Let's see if I can finally figure out how to close this review-request (after almost 3 years...)

The problem is fixed by this revision was already fixed back in Jul 28 16:02:30 2016.