[DVDnav-discuss] r1011 - trunk/libdvdnav/src/dvdread/dvd_reader.c

nicodvb subversion at mplayerhq.hu
Sat Apr 19 12:27:37 CEST 2008


Author: nicodvb
Date: Sat Apr 19 12:27:37 2008
New Revision: 1011

Log:
in DVDDiscID() call DVDCloseFile() before exiting with an error  ; patch by Erik Hovland  - erik hovland org

Modified:
   trunk/libdvdnav/src/dvdread/dvd_reader.c

Modified: trunk/libdvdnav/src/dvdread/dvd_reader.c
==============================================================================
--- trunk/libdvdnav/src/dvdread/dvd_reader.c	(original)
+++ trunk/libdvdnav/src/dvdread/dvd_reader.c	Sat Apr 19 12:27:37 2008
@@ -1117,6 +1117,7 @@ int DVDDiscID( dvd_reader_t *dvd, unsign
 	    char *buffer = (unsigned char *)(((uintptr_t)buffer_base & ~((uintptr_t)2047)) + 2048);
 	    
 	    if( buffer_base == NULL ) {
+	        DVDCloseFile( dvd_file );
 		fprintf( stderr, "libdvdread: DVDDiscId, failed to "
 			 "allocate memory for file read!\n" );
 		return -1;



More information about the DVDnav-discuss mailing list