Page MenuHomeFreeBSD

Fix file descriptor and memory leaks in libdpv
Needs ReviewPublic

Authored by dteske on Jun 8 2016, 10:00 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, May 10, 10:53 PM
Unknown Object (File)
Tue, May 7, 8:39 PM
Unknown Object (File)
Apr 26 2024, 5:51 AM
Unknown Object (File)
Apr 26 2024, 5:51 AM
Unknown Object (File)
Apr 25 2024, 9:40 PM
Unknown Object (File)
Apr 24 2024, 10:15 PM
Unknown Object (File)
Apr 23 2024, 11:02 PM
Unknown Object (File)
Feb 10 2024, 3:25 PM
Subscribers

Details

Reviewers
truckman
Summary

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

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No 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.

Take

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