Page MenuHomeFreeBSD

Fix memory leak in memcontrol
AcceptedPublic

Authored by trix_juniper.net on Mar 21 2017, 1:16 PM.

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
Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

ed accepted this revision.Mar 21 2017, 2:32 PM
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
ed removed a reviewer: ed.Nov 21 2017, 9:43 PM
This revision now requires review to proceed.Nov 21 2017, 9:43 PM
eadler accepted this revision.Apr 21 2018, 4:55 PM
This revision is now accepted and ready to land.Apr 21 2018, 4:55 PM
eadler added a subscriber: ed.Apr 21 2018, 4:55 PM

obv address @ed's comments too