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)
Wed, Dec 11, 7:15 PM
Unknown Object (File)
Sep 27 2024, 6:53 AM
Unknown Object (File)
Sep 24 2024, 12:41 PM
Unknown Object (File)
Sep 12 2024, 11:41 PM
Unknown Object (File)
Sep 8 2024, 9:44 AM
Unknown Object (File)
Sep 4 2024, 8:14 PM
Unknown Object (File)
Aug 30 2024, 7:09 PM
Unknown Object (File)
Aug 23 2024, 8:17 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