Opened 19 years ago

Closed 19 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@…> 19 years ago.

Download all attachments as: .zip

Change History (3)

by Erik Hovland <erik@…>, 19 years ago

comment:1 by paulh, 19 years ago

(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 by paulh, 19 years ago

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.