Page MenuHomeFreeBSD

Fix memory leak in memcontrol
AcceptedPublic

Authored by trix_juniper.net on Mar 21 2017, 1:16 PM.
Tags
None
Referenced Files
Unknown Object (File)
Nov 2 2024, 4:38 AM
Unknown Object (File)
Oct 12 2024, 3:11 PM
Unknown Object (File)
Oct 11 2024, 11:27 PM
Unknown Object (File)
Oct 3 2024, 2:31 PM
Unknown Object (File)
Oct 2 2024, 9:57 PM
Unknown Object (File)
Sep 30 2024, 12:27 PM
Unknown Object (File)
Sep 27 2024, 11:51 AM
Unknown Object (File)
Sep 27 2024, 9:19 AM
Subscribers

Details

Reviewers
eadler
Summary

memcontrol.c clearfunc
Free 'owner' after use

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

ed added inline comments.
usr.sbin/memcontrol/memcontrol.c
280

Technically speaking you should also put a free() call above the strdup()... :-)

This revision is now accepted and ready to land.Mar 21 2017, 2:32 PM
This revision now requires review to proceed.Nov 21 2017, 9:43 PM
This revision is now accepted and ready to land.Apr 21 2018, 4:55 PM

obv address @ed's comments too