Page MenuHomeFreeBSD

Fix file descriptor and memory leaks in libdpv
Needs ReviewPublic

Authored by dteske on Jun 8 2016, 10:00 AM.



Close /dev/tty in tty_maxsize_update() if we open it
in the !isatty(fd) case to avoid leaking the descriptor.
Verify that we were actually able to open /dev/tty.

Don't leak a file descriptor and a process in x11_maxsize_update()
if fgets() fails.

Diff Detail

rS FreeBSD src repository - subversion
Lint OK
No Unit Test Coverage
Build Status
Buildable 4147
Build 4190: arc lint + arc unit

Event Timeline

truckman retitled this revision from to Fix file descriptor and memory leaks in libdpv.
truckman updated this object.
truckman edited the test plan for this revision. (Show Details)
truckman added a reviewer: dteske.
dteske edited reviewers, added: truckman; removed: dteske.


I've only a couple changes I'll make before committing with reference to OP. Instead of "doclose" I will use "opened" which makes the code easier to read.

Sorry for the delay, had a disk failure take out my operations for a full 4 weeks, but finally got all the data recovered and back up and running