Opened 5 years ago

Closed 5 years ago

#12765 closed Patch - Bug Fix (fixed)

Patch to insure fd is valid before close

Reported by: Gary Buhrmaster <gary.buhrmaster@…> Owned by: Gary Buhrmaster <gary.buhrmaster@…>
Priority: trivial Milestone: 29.0
Component: MythTV - MythSystem Version: Master Head
Severity: low Keywords:
Cc: Ticket locked: no


valgrind reported "Warning: invalid file descriptor -1 in syscall close()" from mythsystemunix.cpp. The relevant fd's are initialized to -1 and are updated to valid fds only if certain options are set in the invocation of the function. In some cases, the fd remains -1, which results in the warning message. Silence the warning by insuring that the fd is positive (as done elsewhere in the code) before issuing the close. As this is just a warning message (no actual problem exists except for the warning message) the ticket priority/severity is set to trivial/low.

github ref:

github git-am ref:

Change History (2)

comment:1 Changed 5 years ago by Stuart Auchterlonie

Milestone: unknown29.0

comment:2 Changed 5 years ago by Gary Buhrmaster <gary.buhrmaster@…>

Owner: set to Gary Buhrmaster <gary.buhrmaster@…>
Resolution: fixed
Status: newclosed

In cb944639f507aec284b59a8c8c7946b680901823/mythtv:

Fixes #12765 - Only close valid filedescriptors

(cherry picked from commit 520538417c3fd0a1741bc47aaf4a54d6233c6f4e)
Signed-off-by: Stuart Auchterlonie <stuarta@…>

Note: See TracTickets for help on using tickets.