Opened 17 years ago

Closed 17 years ago

#4670 closed patch (fixed)

If buffer alloc fails, dvd file should be closed

Reported by: Erik Hovland <erik@…> Owned by: Isaac Richards
Priority: minor Milestone: 0.21
Component: mythtv Version: head
Severity: low Keywords:
Cc: Ticket locked: no

Description

In the function DVDDiscID, in the file dvd_reader.c, in libmythdvdnav the function allocates a buffer to store some disc id information. If that allocation fails the function returns but the dvd file is still open. Which means that both the dvd file struct and the file handle associated to that dvd file are leaked.

Attachments (1)

fix-possible-dvd-file-leak-in-dvdnav-dvd_reader.patch (926 bytes) - added by Erik Hovland <erik@…> 17 years ago.

Download all attachments as: .zip

Change History (3)

Changed 17 years ago by Erik Hovland <erik@…>

comment:1 Changed 17 years ago by paulh

(In [16156]) Fix a possible memory leak in libmythdvdnav.

If DVDDiscID() fails to allocate its needed buffer then it was exiting without first closing the file it opened.

Patch by Erik Hovland. Refs #4670.

comment:2 Changed 17 years ago by paulh

Resolution: fixed
Status: newclosed

(In [16157]) Fix a possible memory leak in libmythdvdnav.

If DVDDiscID() fails to allocate its needed buffer then it was exiting without first closing the file it opened.

Patch by Erik Hovland. Fixes #4670.

Note: See TracTickets for help on using tickets.