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)
Feb 10 2024, 3:25 PM
Unknown Object (File)
Aug 6 2023, 8:08 AM
Unknown Object (File)
Jun 24 2023, 9:20 PM
Unknown Object (File)
Jun 15 2023, 8:55 PM
Unknown Object (File)
May 5 2023, 9:12 AM
Unknown Object (File)
Mar 17 2023, 5:01 AM
Unknown Object (File)
Mar 2 2023, 8:13 AM
Unknown Object (File)
Feb 18 2023, 7:39 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