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
Unknown Object (File)
Oct 17 2024, 3:44 AM
Unknown Object (File)
Sep 25 2024, 4:11 PM
Unknown Object (File)
Sep 17 2024, 1:45 AM
Unknown Object (File)
Sep 2 2024, 11:35 PM
Unknown Object (File)
Sep 2 2024, 4:55 PM
Unknown Object (File)
Aug 29 2024, 4:13 AM
Unknown Object (File)
Aug 23 2024, 6:01 AM
Unknown Object (File)
Aug 23 2024, 5:59 AM
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.