Page MenuHomeFreeBSD

Fix memory leak in autofs
AcceptedPublic

Authored by trix_juniper.net on Mar 20 2017, 3:54 PM.
Tags
None
Referenced Files
Unknown Object (File)
Dec 20 2023, 1:43 AM
Unknown Object (File)
Dec 13 2023, 6:27 AM
Unknown Object (File)
Nov 30 2023, 3:56 PM
Unknown Object (File)
Nov 19 2023, 1:51 PM
Unknown Object (File)
Aug 28 2023, 7:55 AM
Unknown Object (File)
Jul 24 2023, 1:06 AM
Unknown Object (File)
Jun 15 2023, 2:07 PM
Unknown Object (File)
Jun 8 2023, 4:29 AM
Subscribers

Details

Reviewers
trasz
ngie
Summary

common.c create_directory
Free tofree when returning early.

Test Plan

Use clang's static analyzer, scan-build, to find the problem and later to show resolution.

Diff Detail

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

Event Timeline

usr.sbin/autofs/common.c
155

An equivalent way to do this would be to call break instead of return here. I think this is the best way to fix the problem because it means that the cleanup path is equivalent.. but I would get signoff from trasz since he's the autofs developer/maintainer.

This revision is now accepted and ready to land.May 5 2017, 5:23 AM

I'd prefer the "break" as well.

@trix_juniper.net: this patch never made it in to base. Could you please change the return to a break and submit an updated version of the patch, so we can commit it for you?