dvd_reader.c does not close the dvd file struct if it cannot allocate
From: Erik Hovland <erik@hovland.org>
enough memory to read in the file. This is a minor leak and likely
to not be detrimental since it will close the program at this
point. But you can never be too careful.
This patch adds the needed close.
---
libs/libmythdvdnav/dvd_reader.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/libs/libmythdvdnav/dvd_reader.c b/libs/libmythdvdnav/dvd_reader.c
index 3a448b5..f44bbab 100644
|
a
|
b
|
int DVDDiscID( dvd_reader_t *dvd, unsigned char *discid )
|
| 1097 | 1097 | if( buffer_base == NULL ) { |
| 1098 | 1098 | fprintf( stderr, "libdvdread: DVDDiscId, failed to " |
| 1099 | 1099 | "allocate memory for file read!\n" ); |
| | 1100 | DVDCloseFile( dvd_file ); |
| 1100 | 1101 | return -1; |
| 1101 | 1102 | } |
| 1102 | 1103 | bytes_read = DVDReadBytes( dvd_file, buffer, file_size ); |