Page MenuHomeFreeBSD

Fix a memory leak with the variable logfname
Needs ReviewPublic

Authored by trix_juniper.net on Feb 16 2017, 5:24 PM.

Details

Reviewers
gad
emaste
stevek
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
Lint
Lint Skipped
Unit
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.
gad added a reviewer: gad.Mar 20 2017, 10:57 PM
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.

emaste edited edge metadata.May 15 2017, 3:54 PM
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!

Fine with me as well.

gad added a comment.Dec 19 2017, 7:43 PM

Ping @gad

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

gad added a comment.Feb 21 2018, 9:39 PM

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.