Commit 70d25dec authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf
Browse files

free(NULL) is a no-op

parent 874873d6
...@@ -603,14 +603,11 @@ dvd_reader_t *DVDOpen( const char *ppath ) ...@@ -603,14 +603,11 @@ dvd_reader_t *DVDOpen( const char *ppath )
DVDOpen_error: DVDOpen_error:
/* If it's none of the above, screw it. */ /* If it's none of the above, screw it. */
fprintf( stderr, "libdvdread: Could not open %s\n", path ); fprintf( stderr, "libdvdread: Could not open %s\n", path );
if( path != NULL ) free( path );
free( path ); free( path_copy );
if ( path_copy != NULL )
free( path_copy );
if ( cdir >= 0 ) if ( cdir >= 0 )
close( cdir ); close( cdir );
if ( new_path != NULL ) free( new_path );
free( new_path );
return NULL; return NULL;
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment