Commit 9630c00c authored by Rémi Duraffort's avatar Rémi Duraffort

Another time "Remove useless test before a free".

parent 85943656
...@@ -154,7 +154,7 @@ static int Open( vlc_object_t *p_this ) ...@@ -154,7 +154,7 @@ static int Open( vlc_object_t *p_this )
psz_name = var_CreateGetString( p_this, "cd-audio" ); psz_name = var_CreateGetString( p_this, "cd-audio" );
if( !psz_name || !*psz_name ) if( !psz_name || !*psz_name )
{ {
if( psz_name ) free( psz_name ); free( psz_name );
return VLC_EGENERIC; return VLC_EGENERIC;
} }
} }
...@@ -478,8 +478,7 @@ static int GetTracks( access_t *p_access, ...@@ -478,8 +478,7 @@ static int GetTracks( access_t *p_access,
{ {
if( cddb_track_get_title( t ) != NULL ) if( cddb_track_get_title( t ) != NULL )
{ {
if( p_input_item->psz_name ) free( p_input_item->psz_name );
free( p_input_item->psz_name );
p_input_item->psz_name = strdup( cddb_track_get_title( t ) ); p_input_item->psz_name = strdup( cddb_track_get_title( t ) );
input_item_SetTitle( p_input_item, cddb_track_get_title( t ) ); input_item_SetTitle( p_input_item, cddb_track_get_title( t ) );
} }
......
...@@ -306,8 +306,8 @@ static block_t * CDDAReadBlocks( access_t * p_access ) ...@@ -306,8 +306,8 @@ static block_t * CDDAReadBlocks( access_t * p_access )
msg_Err( p_access, "%s%s\n", psz_mes ? psz_mes: "", msg_Err( p_access, "%s%s\n", psz_mes ? psz_mes: "",
psz_err ? psz_err: "" ); psz_err ? psz_err: "" );
if( psz_err ) free( psz_err ); free( psz_err );
if( psz_mes ) free( psz_mes ); free( psz_mes );
if( !p_readbuf ) if( !p_readbuf )
{ {
msg_Err( p_access, "paranoia read error on frame %i\n", msg_Err( p_access, "paranoia read error on frame %i\n",
...@@ -400,7 +400,7 @@ CDDARead( access_t * p_access, uint8_t *p_buffer, size_t i_len ) ...@@ -400,7 +400,7 @@ CDDARead( access_t * p_access, uint8_t *p_buffer, size_t i_len )
{ {
char *psz_title = CDDAFormatTitle( p_access, p_cdda->i_track ); char *psz_title = CDDAFormatTitle( p_access, p_cdda->i_track );
input_Control( p_cdda->p_input, INPUT_SET_NAME, psz_title ); input_Control( p_cdda->p_input, INPUT_SET_NAME, psz_title );
free(psz_title); free( psz_title );
} }
else else
{ {
...@@ -628,8 +628,7 @@ int CDDAOpen( vlc_object_t *p_this ) ...@@ -628,8 +628,7 @@ int CDDAOpen( vlc_object_t *p_this )
if( !(p_cdio = cdio_open( psz_source, DRIVER_UNKNOWN )) ) if( !(p_cdio = cdio_open( psz_source, DRIVER_UNKNOWN )) )
{ {
msg_Warn( p_access, "could not open %s", psz_source ); msg_Warn( p_access, "could not open %s", psz_source );
if ( psz_source ) free( psz_source );
free( psz_source );
return VLC_EGENERIC; return VLC_EGENERIC;
} }
...@@ -809,7 +808,7 @@ int CDDAOpen( vlc_object_t *p_this ) ...@@ -809,7 +808,7 @@ int CDDAOpen( vlc_object_t *p_this )
error: error:
cdio_destroy( p_cdda->p_cdio ); cdio_destroy( p_cdda->p_cdio );
if( psz_source) free( psz_source ); free( psz_source );
if( p_cdda ) if( p_cdda )
{ {
if ( p_cdda->p_input ) if ( p_cdda->p_input )
...@@ -857,8 +856,8 @@ void CDDAClose (vlc_object_t *p_this ) ...@@ -857,8 +856,8 @@ void CDDAClose (vlc_object_t *p_this )
cdio_cddap_close_no_free_cdio( p_cdda->paranoia_cd ); cdio_cddap_close_no_free_cdio( p_cdda->paranoia_cd );
#endif #endif
if( p_cdda->psz_mcn ) free( p_cdda->psz_mcn ); free( p_cdda->psz_mcn );
if( p_cdda->psz_source ) free( p_cdda->psz_source ); free( p_cdda->psz_source );
#if LIBCDDB_VERSION_NUM >= 1 #if LIBCDDB_VERSION_NUM >= 1
libcddb_shutdown(); libcddb_shutdown();
...@@ -1006,7 +1005,7 @@ static int CDDAControl( access_t *p_access, int i_query, va_list args ) ...@@ -1006,7 +1005,7 @@ static int CDDAControl( access_t *p_access, int i_query, va_list args )
char *psz_title = CDDAFormatTitle( p_access, i_track ); char *psz_title = CDDAFormatTitle( p_access, i_track );
input_Control( p_cdda->p_input, INPUT_SET_NAME, input_Control( p_cdda->p_input, INPUT_SET_NAME,
psz_title ); psz_title );
free(psz_title); free( psz_title );
p_cdda->i_track = i_track; p_cdda->i_track = i_track;
i_last_lsn = cdio_get_track_lsn( p_cdda->p_cdio, i_last_lsn = cdio_get_track_lsn( p_cdda->p_cdio,
CDIO_CDROM_LEADOUT_TRACK ); CDIO_CDROM_LEADOUT_TRACK );
......
...@@ -628,10 +628,8 @@ static void Close( vlc_object_t *p_this ) ...@@ -628,10 +628,8 @@ static void Close( vlc_object_t *p_this )
dc1394_destroy_handle( p_sys->fd_video ); dc1394_destroy_handle( p_sys->fd_video );
CloseAudioDev( p_demux ); CloseAudioDev( p_demux );
if( p_sys->camera_nodes ) free( p_sys->camera_nodes );
free( p_sys->camera_nodes ); free( p_sys->audio_device );
if( p_sys->audio_device )
free( p_sys->audio_device );
free( p_sys ); free( p_sys );
} }
...@@ -859,7 +857,7 @@ static int process_options( demux_t *p_demux ) ...@@ -859,7 +857,7 @@ static int process_options( demux_t *p_demux )
"video size of 160x120 is actually disabled for lack of chroma " "video size of 160x120 is actually disabled for lack of chroma "
"support. It will relased ASAP, until then try an higher size " "support. It will relased ASAP, until then try an higher size "
"(320x240 and 640x480 are fully supported)" ); "(320x240 and 640x480 are fully supported)" );
free(psz_dup); free( psz_dup );
return VLC_EGENERIC; return VLC_EGENERIC;
#if 0 #if 0
p_sys->frame_size = MODE_160x120_YUV444; p_sys->frame_size = MODE_160x120_YUV444;
...@@ -886,7 +884,7 @@ static int process_options( demux_t *p_demux ) ...@@ -886,7 +884,7 @@ static int process_options( demux_t *p_demux )
" 160x120, 320x240, and 640x480. " " 160x120, 320x240, and 640x480. "
"Please specify one of them. You have specified %s.", "Please specify one of them. You have specified %s.",
token ); token );
free(psz_dup); free( psz_dup );
return VLC_EGENERIC; return VLC_EGENERIC;
} }
msg_Dbg( p_demux, "Requested video size : %s",token ); msg_Dbg( p_demux, "Requested video size : %s",token );
...@@ -914,7 +912,7 @@ static int process_options( demux_t *p_demux ) ...@@ -914,7 +912,7 @@ static int process_options( demux_t *p_demux )
" 1.875, 3.75, 7.5, 15, 30, 60. " " 1.875, 3.75, 7.5, 15, 30, 60. "
"Please specify one of them. You have specified %s.", "Please specify one of them. You have specified %s.",
token); token);
free(psz_dup); free( psz_dup );
return VLC_EGENERIC; return VLC_EGENERIC;
} }
msg_Dbg( p_demux, "Requested frame rate : %s",token ); msg_Dbg( p_demux, "Requested frame rate : %s",token );
...@@ -929,7 +927,7 @@ static int process_options( demux_t *p_demux ) ...@@ -929,7 +927,7 @@ static int process_options( demux_t *p_demux )
msg_Err( p_demux, "Bad brightness value '%s', " msg_Err( p_demux, "Bad brightness value '%s', "
"must be an unsigned integer.", "must be an unsigned integer.",
token ); token );
free(psz_dup); free( psz_dup );
return VLC_EGENERIC; return VLC_EGENERIC;
} }
} }
...@@ -958,7 +956,7 @@ static int process_options( demux_t *p_demux ) ...@@ -958,7 +956,7 @@ static int process_options( demux_t *p_demux )
msg_Err( p_demux, "Bad camera number '%s', " msg_Err( p_demux, "Bad camera number '%s', "
"must be an unsigned integer.", "must be an unsigned integer.",
token ); token );
free(psz_dup); free( psz_dup );
return VLC_EGENERIC; return VLC_EGENERIC;
} }
} }
...@@ -980,7 +978,7 @@ static int process_options( demux_t *p_demux ) ...@@ -980,7 +978,7 @@ static int process_options( demux_t *p_demux )
msg_Err(p_demux, "Bad capture method value '%s', " msg_Err(p_demux, "Bad capture method value '%s', "
"it can be 'raw1394' or 'video1394'.", "it can be 'raw1394' or 'video1394'.",
token ); token );
free(psz_dup); free( psz_dup );
return VLC_EGENERIC; return VLC_EGENERIC;
} }
} }
...@@ -1011,7 +1009,7 @@ static int process_options( demux_t *p_demux ) ...@@ -1011,7 +1009,7 @@ static int process_options( demux_t *p_demux )
sscanf( token, "0x%llx", &p_sys->selected_uid ); sscanf( token, "0x%llx", &p_sys->selected_uid );
} }
} }
if( psz_dup ) free( psz_dup ); free( psz_dup );
return VLC_SUCCESS; return VLC_SUCCESS;
} }
...@@ -266,7 +266,7 @@ static ssize_t Read( access_t *p_access, uint8_t *p_buffer, size_t i_len) ...@@ -266,7 +266,7 @@ static ssize_t Read( access_t *p_access, uint8_t *p_buffer, size_t i_len)
playlist_Signal( p_playlist ); playlist_Signal( p_playlist );
if( psz_name ) free( psz_name ); free( psz_name );
vlc_object_release( p_input ); vlc_object_release( p_input );
vlc_object_release( p_playlist ); vlc_object_release( p_playlist );
...@@ -455,7 +455,7 @@ static int ReadDir( playlist_t *p_playlist, const char *psz_name, ...@@ -455,7 +455,7 @@ static int ReadDir( playlist_t *p_playlist, const char *psz_name,
psz_parser = ptr + 1; psz_parser = ptr + 1;
} }
} }
if( psz_ignore ) free( psz_ignore ); free( psz_ignore );
/* While we still have entries in the directory */ /* While we still have entries in the directory */
for( i = 0; i < i_dir_content; i++ ) for( i = 0; i < i_dir_content; i++ )
...@@ -545,12 +545,12 @@ static int ReadDir( playlist_t *p_playlist, const char *psz_name, ...@@ -545,12 +545,12 @@ static int ReadDir( playlist_t *p_playlist, const char *psz_name,
} }
for( i = 0; i < i_extensions; i++ ) for( i = 0; i < i_extensions; i++ )
if( ppsz_extensions[i] ) free( ppsz_extensions[i] ); free( ppsz_extensions[i] );
if( ppsz_extensions ) free( ppsz_extensions ); free( ppsz_extensions );
for( i = 0; i < i_dir_content; i++ ) for( i = 0; i < i_dir_content; i++ )
if( pp_dir_content[i] ) free( pp_dir_content[i] ); free( pp_dir_content[i] );
if( pp_dir_content ) free( pp_dir_content ); free( pp_dir_content );
return i_return; return i_return;
} }
......
...@@ -333,12 +333,12 @@ static int CommonOpen( vlc_object_t *p_this, access_sys_t *p_sys, ...@@ -333,12 +333,12 @@ static int CommonOpen( vlc_object_t *p_this, access_sys_t *p_sys,
var_Create( p_this, "dshow-vdev", VLC_VAR_STRING | VLC_VAR_DOINHERIT ); var_Create( p_this, "dshow-vdev", VLC_VAR_STRING | VLC_VAR_DOINHERIT );
var_Get( p_this, "dshow-vdev", &val ); var_Get( p_this, "dshow-vdev", &val );
if( val.psz_string ) vdevname = string( val.psz_string ); if( val.psz_string ) vdevname = string( val.psz_string );
if( val.psz_string ) free( val.psz_string ); free( val.psz_string );
var_Create( p_this, "dshow-adev", VLC_VAR_STRING | VLC_VAR_DOINHERIT ); var_Create( p_this, "dshow-adev", VLC_VAR_STRING | VLC_VAR_DOINHERIT );
var_Get( p_this, "dshow-adev", &val ); var_Get( p_this, "dshow-adev", &val );
if( val.psz_string ) adevname = string( val.psz_string ); if( val.psz_string ) adevname = string( val.psz_string );
if( val.psz_string ) free( val.psz_string ); free( val.psz_string );
static struct {char *psz_size; int i_width; int i_height;} size_table[] = static struct {char *psz_size; int i_width; int i_height;} size_table[] =
{ { "subqcif", 128, 96 }, { "qsif", 160, 120 }, { "qcif", 176, 144 }, { { "subqcif", 128, 96 }, { "qsif", 160, 120 }, { "qcif", 176, 144 },
...@@ -370,7 +370,7 @@ static int CommonOpen( vlc_object_t *p_this, access_sys_t *p_sys, ...@@ -370,7 +370,7 @@ static int CommonOpen( vlc_object_t *p_this, access_sys_t *p_sys,
msg_Dbg( p_this, "width x height %dx%d", i_width, i_height ); msg_Dbg( p_this, "width x height %dx%d", i_width, i_height );
} }
} }
if( val.psz_string ) free( val.psz_string ); free( val.psz_string );
p_sys->b_chroma = VLC_FALSE; p_sys->b_chroma = VLC_FALSE;
var_Create( p_this, "dshow-chroma", VLC_VAR_STRING | VLC_VAR_DOINHERIT ); var_Create( p_this, "dshow-chroma", VLC_VAR_STRING | VLC_VAR_DOINHERIT );
...@@ -381,7 +381,7 @@ static int CommonOpen( vlc_object_t *p_this, access_sys_t *p_sys, ...@@ -381,7 +381,7 @@ static int CommonOpen( vlc_object_t *p_this, access_sys_t *p_sys,
val.psz_string[2], val.psz_string[3] ); val.psz_string[2], val.psz_string[3] );
p_sys->b_chroma = VLC_TRUE; p_sys->b_chroma = VLC_TRUE;
} }
if( val.psz_string ) free( val.psz_string ); free( val.psz_string );
var_Create( p_this, "dshow-fps", VLC_VAR_FLOAT | VLC_VAR_DOINHERIT ); var_Create( p_this, "dshow-fps", VLC_VAR_FLOAT | VLC_VAR_DOINHERIT );
var_Create( p_this, "dshow-tuner-channel", var_Create( p_this, "dshow-tuner-channel",
......
...@@ -229,7 +229,7 @@ static int Open( vlc_object_t *p_this ) ...@@ -229,7 +229,7 @@ static int Open( vlc_object_t *p_this )
putenv( psz_env ); putenv( psz_env );
} }
if( psz_dvdcss_env ) free( psz_dvdcss_env ); free( psz_dvdcss_env );
/* Open dvdread */ /* Open dvdread */
if( !(p_dvdread = DVDOpen( psz_name )) ) if( !(p_dvdread = DVDOpen( psz_name )) )
......
...@@ -623,7 +623,7 @@ static int ftp_ReadCommand( vlc_object_t *p_access, access_sys_t *p_sys, ...@@ -623,7 +623,7 @@ static int ftp_ReadCommand( vlc_object_t *p_access, access_sys_t *p_sys,
if( psz_line == NULL || strlen( psz_line ) < 3 ) if( psz_line == NULL || strlen( psz_line ) < 3 )
{ {
msg_Err( p_access, "cannot get answer" ); msg_Err( p_access, "cannot get answer" );
if( psz_line ) free( psz_line ); free( psz_line );
if( pi_answer ) *pi_answer = 500; if( pi_answer ) *pi_answer = 500;
if( ppsz_answer ) *ppsz_answer = NULL; if( ppsz_answer ) *ppsz_answer = NULL;
return -1; return -1;
......
...@@ -356,14 +356,14 @@ connect: ...@@ -356,14 +356,14 @@ connect:
psz_login, psz_password ); psz_login, psz_password );
if( psz_login ) p_sys->url.psz_username = strdup( psz_login ); if( psz_login ) p_sys->url.psz_username = strdup( psz_login );
if( psz_password ) p_sys->url.psz_password = strdup( psz_password ); if( psz_password ) p_sys->url.psz_password = strdup( psz_password );
if( psz_login ) free( psz_login ); free( psz_login );
if( psz_password ) free( psz_password ); free( psz_password );
goto connect; goto connect;
} }
else else
{ {
if( psz_login ) free( psz_login ); free( psz_login );
if( psz_password ) free( psz_password ); free( psz_password );
goto error; goto error;
} }
} }
...@@ -614,7 +614,7 @@ static ssize_t Read( access_t *p_access, uint8_t *p_buffer, size_t i_len ) ...@@ -614,7 +614,7 @@ static ssize_t Read( access_t *p_access, uint8_t *p_buffer, size_t i_len )
{ {
/* read the empty line */ /* read the empty line */
char *psz = net_Gets( VLC_OBJECT(p_access), p_sys->fd, p_sys->p_vs ); char *psz = net_Gets( VLC_OBJECT(p_access), p_sys->fd, p_sys->p_vs );
if( psz ) free( psz ); free( psz );
} }
} }
} }
...@@ -712,8 +712,7 @@ static int ReadICYMeta( access_t *p_access ) ...@@ -712,8 +712,7 @@ static int ReadICYMeta( access_t *p_access )
if( !p_sys->psz_icy_title || if( !p_sys->psz_icy_title ||
strcmp( p_sys->psz_icy_title, &p[1] ) ) strcmp( p_sys->psz_icy_title, &p[1] ) )
{ {
if( p_sys->psz_icy_title ) free( p_sys->psz_icy_title );
free( p_sys->psz_icy_title );
p_sys->psz_icy_title = strdup( &p[1] ); p_sys->psz_icy_title = strdup( &p[1] );
p_access->info.i_update |= INPUT_UPDATE_META; p_access->info.i_update |= INPUT_UPDATE_META;
...@@ -1241,12 +1240,12 @@ static int Request( access_t *p_access, int64_t i_tell ) ...@@ -1241,12 +1240,12 @@ static int Request( access_t *p_access, int64_t i_tell )
psz_new_loc = strdup( p ); psz_new_loc = strdup( p );
} }
if( p_sys->psz_location ) free( p_sys->psz_location ); free( p_sys->psz_location );
p_sys->psz_location = psz_new_loc; p_sys->psz_location = psz_new_loc;
} }
else if( !strcasecmp( psz, "Content-Type" ) ) else if( !strcasecmp( psz, "Content-Type" ) )
{ {
if( p_sys->psz_mime ) free( p_sys->psz_mime ); free( p_sys->psz_mime );
p_sys->psz_mime = strdup( p ); p_sys->psz_mime = strdup( p );
msg_Dbg( p_access, "Content-Type: %s", p_sys->psz_mime ); msg_Dbg( p_access, "Content-Type: %s", p_sys->psz_mime );
} }
...@@ -1264,7 +1263,7 @@ static int Request( access_t *p_access, int64_t i_tell ) ...@@ -1264,7 +1263,7 @@ static int Request( access_t *p_access, int64_t i_tell )
{ {
if( !strcasecmp( psz, "Pragma: features" ) ) if( !strcasecmp( psz, "Pragma: features" ) )
p_sys->b_mms = VLC_TRUE; p_sys->b_mms = VLC_TRUE;
if( p_sys->psz_pragma ) free( p_sys->psz_pragma ); free( p_sys->psz_pragma );
p_sys->psz_pragma = strdup( p ); p_sys->psz_pragma = strdup( p );
msg_Dbg( p_access, "Pragma: %s", p_sys->psz_pragma ); msg_Dbg( p_access, "Pragma: %s", p_sys->psz_pragma );
} }
...@@ -1305,7 +1304,7 @@ static int Request( access_t *p_access, int64_t i_tell ) ...@@ -1305,7 +1304,7 @@ static int Request( access_t *p_access, int64_t i_tell )
} }
else if( !strcasecmp( psz, "Icy-Name" ) ) else if( !strcasecmp( psz, "Icy-Name" ) )
{ {
if( p_sys->psz_icy_name ) free( p_sys->psz_icy_name ); free( p_sys->psz_icy_name );
p_sys->psz_icy_name = strdup( p ); p_sys->psz_icy_name = strdup( p );
msg_Dbg( p_access, "Icy-Name: %s", p_sys->psz_icy_name ); msg_Dbg( p_access, "Icy-Name: %s", p_sys->psz_icy_name );
...@@ -1315,7 +1314,7 @@ static int Request( access_t *p_access, int64_t i_tell ) ...@@ -1315,7 +1314,7 @@ static int Request( access_t *p_access, int64_t i_tell )
} }
else if( !strcasecmp( psz, "Icy-Genre" ) ) else if( !strcasecmp( psz, "Icy-Genre" ) )
{ {
if( p_sys->psz_icy_genre ) free( p_sys->psz_icy_genre ); free( p_sys->psz_icy_genre );
p_sys->psz_icy_genre = strdup( p ); p_sys->psz_icy_genre = strdup( p );
msg_Dbg( p_access, "Icy-Genre: %s", p_sys->psz_icy_genre ); msg_Dbg( p_access, "Icy-Genre: %s", p_sys->psz_icy_genre );
} }
......
...@@ -215,9 +215,9 @@ static int Open( vlc_object_t *p_this ) ...@@ -215,9 +215,9 @@ static int Open( vlc_object_t *p_this )
{ {
msg_Err( p_demux, "failed to register a JACK port" ); msg_Err( p_demux, "failed to register a JACK port" );
if( p_sys->p_jack_client) jack_client_close( p_sys->p_jack_client ); if( p_sys->p_jack_client) jack_client_close( p_sys->p_jack_client );
if( p_sys->pp_jack_port_input ) free( p_sys->pp_jack_port_input ); free( p_sys->pp_jack_port_input );
if( p_sys->p_jack_ringbuffer ) jack_ringbuffer_free( p_sys->p_jack_ringbuffer ); if( p_sys->p_jack_ringbuffer ) jack_ringbuffer_free( p_sys->p_jack_ringbuffer );
if( p_sys->pp_jack_buffer ) free( p_sys->pp_jack_buffer ); free( p_sys->pp_jack_buffer );
free( p_sys ); free( p_sys );
return VLC_EGENERIC; return VLC_EGENERIC;
} }
...@@ -240,9 +240,9 @@ static int Open( vlc_object_t *p_this ) ...@@ -240,9 +240,9 @@ static int Open( vlc_object_t *p_this )
{ {
msg_Err( p_demux, "failed to activate JACK client" ); msg_Err( p_demux, "failed to activate JACK client" );
if( p_sys->p_jack_client) jack_client_close( p_sys->p_jack_client ); if( p_sys->p_jack_client) jack_client_close( p_sys->p_jack_client );
if( p_sys->pp_jack_port_input ) free( p_sys->pp_jack_port_input ); free( p_sys->pp_jack_port_input );
if( p_sys->p_jack_ringbuffer ) jack_ringbuffer_free( p_sys->p_jack_ringbuffer ); if( p_sys->p_jack_ringbuffer ) jack_ringbuffer_free( p_sys->p_jack_ringbuffer );
if( p_sys->pp_jack_buffer ) free( p_sys->pp_jack_buffer ); free( p_sys->pp_jack_buffer );
free( p_sys ); free( p_sys );
return VLC_EGENERIC; return VLC_EGENERIC;
} }
...@@ -287,7 +287,7 @@ static int Open( vlc_object_t *p_this ) ...@@ -287,7 +287,7 @@ static int Open( vlc_object_t *p_this )
jack_port_name( p_sys->pp_jack_port_input[i_input_ports] ) ); jack_port_name( p_sys->pp_jack_port_input[i_input_ports] ) );
} }
} }
if( pp_jack_port_output ) free( pp_jack_port_output ); free( pp_jack_port_output );
} }
/* info about jack server */ /* info about jack server */
...@@ -327,9 +327,9 @@ static void Close( vlc_object_t *p_this ) ...@@ -327,9 +327,9 @@ static void Close( vlc_object_t *p_this )
if( p_sys->p_block_audio ) block_Release( p_sys->p_block_audio ); if( p_sys->p_block_audio ) block_Release( p_sys->p_block_audio );
if( p_sys->p_jack_client ) jack_client_close( p_sys->p_jack_client ); if( p_sys->p_jack_client ) jack_client_close( p_sys->p_jack_client );
if( p_sys->p_jack_ringbuffer ) jack_ringbuffer_free( p_sys->p_jack_ringbuffer ); if( p_sys->p_jack_ringbuffer ) jack_ringbuffer_free( p_sys->p_jack_ringbuffer );
if( p_sys->pp_jack_port_input ) free( p_sys->pp_jack_port_input ); free( p_sys->pp_jack_port_input );
if( p_sys->pp_jack_buffer ) free( p_sys->pp_jack_buffer ); free( p_sys->pp_jack_buffer );
if( p_sys->pp_jack_port_table ) free( p_sys->pp_jack_port_table ); free( p_sys->pp_jack_port_table );
free( p_sys ); free( p_sys );
} }
...@@ -546,7 +546,7 @@ static void Port_finder( demux_t *p_demux ) ...@@ -546,7 +546,7 @@ static void Port_finder( demux_t *p_demux )
} }
} }
if( pp_jack_port_output ) free( pp_jack_port_output ); free( pp_jack_port_output );
p_sys->i_match_ports = i_total_out_ports; p_sys->i_match_ports = i_total_out_ports;
} }
......
...@@ -131,7 +131,7 @@ static int RtspReadLine( void *p_userdata, uint8_t *p_buffer, int i_buffer ) ...@@ -131,7 +131,7 @@ static int RtspReadLine( void *p_userdata, uint8_t *p_buffer, int i_buffer )
if( psz ) strncpy( (char *)p_buffer, psz, i_buffer ); if( psz ) strncpy( (char *)p_buffer, psz, i_buffer );
else *p_buffer = 0; else *p_buffer = 0;
if( psz ) free( psz ); free( psz );
return 0; return 0;
} }
...@@ -248,11 +248,11 @@ static int Open( vlc_object_t *p_this ) ...@@ -248,11 +248,11 @@ static int Open( vlc_object_t *p_this )
var_Create( p_access, "realrtsp-caching", var_Create( p_access, "realrtsp-caching",
VLC_VAR_INTEGER | VLC_VAR_DOINHERIT); VLC_VAR_INTEGER | VLC_VAR_DOINHERIT);
if( psz_server ) free( psz_server ); free( psz_server );
return VLC_SUCCESS; return VLC_SUCCESS;
error: error:
if( psz_server ) free( psz_server ); free( psz_server );
Close( p_this ); Close( p_this );
return VLC_EGENERIC; return VLC_EGENERIC;
} }
...@@ -266,7 +266,7 @@ static void Close( vlc_object_t * p_this ) ...@@ -266,7 +266,7 @@ static void Close( vlc_object_t * p_this )
access_sys_t *p_sys = p_access->p_sys; access_sys_t *p_sys = p_access->p_sys;
if( p_sys->p_rtsp ) rtsp_close( p_sys->p_rtsp ); if( p_sys->p_rtsp ) rtsp_close( p_sys->p_rtsp );
if( p_sys->p_rtsp ) free( p_sys->p_rtsp ); free( p_sys->p_rtsp );
free( p_sys ); free( p_sys );
} }
......
...@@ -480,7 +480,7 @@ rmff_header_t *real_parse_sdp(char *data, char **stream_rules, uint32_t bandwidt ...@@ -480,7 +480,7 @@ rmff_header_t *real_parse_sdp(char *data, char **stream_rules, uint32_t bandwidt
if (!desc->stream[i]->mlti_data) { if (!desc->stream[i]->mlti_data) {
len = 0; len = 0;
if( buf ) free( buf ); free( buf );
buf = NULL; buf = NULL;
} else } else
len=select_mlti_data(desc->stream[i]->mlti_data, len=select_mlti_data(desc->stream[i]->mlti_data,
...@@ -531,13 +531,13 @@ rmff_header_t *real_parse_sdp(char *data, char **stream_rules, uint32_t bandwidt ...@@ -531,13 +531,13 @@ rmff_header_t *real_parse_sdp(char *data, char **stream_rules, uint32_t bandwidt
rmff_fix_header(header); rmff_fix_header(header);
if( desc ) sdpplin_free( desc ); if( desc ) sdpplin_free( desc );
if( buf ) free(buf); free( buf );
return header; return header;
error: error:
if( desc ) sdpplin_free( desc ); if( desc ) sdpplin_free( desc );
if( header ) rmff_free_header( header ); if( header ) rmff_free_header( header );
if( buf ) free( buf ); free( buf );
return NULL; return NULL;
} }
...@@ -642,10 +642,10 @@ rmff_header_t *real_setup_and_get_header(rtsp_client_t *rtsp_session, int bandw ...@@ -642,10 +642,10 @@ rmff_header_t *real_setup_and_get_header(rtsp_client_t *rtsp_session, int bandw
lprintf("real: got message from server:\n%s\n", alert); lprintf("real: got message from server:\n%s\n", alert);
} }
printf( "bou\n"); printf( "bou\n");
rtsp_send_ok(rtsp_session); rtsp_send_ok( rtsp_session );
if( challenge1 ) free(challenge1); free( challenge1 );
if( alert ) free(alert); free( alert );
if( buf ) free(buf); free( buf );
return NULL; return NULL;
} }
...@@ -724,19 +724,19 @@ rmff_header_t *real_setup_and_get_header(rtsp_client_t *rtsp_session, int bandw ...@@ -724,19 +724,19 @@ rmff_header_t *real_setup_and_get_header(rtsp_client_t *rtsp_session, int bandw
rtsp_schedule_field(rtsp_session, "Range: npt=0-"); rtsp_schedule_field(rtsp_session, "Range: npt=0-");
rtsp_request_play(rtsp_session,NULL); rtsp_request_play(rtsp_session,NULL);
if( challenge1 ) free( challenge1 ); free( challenge1 );
if( session_id ) free( session_id ); free( session_id );
if( description ) free(description); free( description );
if( subscribe ) free(subscribe); free( subscribe );
if( buf ) free(buf); free( buf );
return h; return h;
error: error:
if( h ) rmff_free_header( h ); if( h ) rmff_free_header( h );
if( challenge1 ) free( challenge1 ); free( challenge1 );
if( session_id ) free( session_id ); free( session_id );
if( description ) free(description); free( description );
if( subscribe ) free(subscribe); free( subscribe );
if( buf ) free(buf); free( buf );
return NULL; return NULL;
} }
...@@ -383,7 +383,7 @@ rmff_mdpr_t *rmff_new_mdpr( ...@@ -383,7 +383,7 @@ rmff_mdpr_t *rmff_new_mdpr(
mdpr->type_specific_data = malloc(sizeof(char)*type_specific_len); mdpr->type_specific_data = malloc(sizeof(char)*type_specific_len);
if( !mdpr->type_specific_data ) { if( !mdpr->type_specific_data ) {
if( mdpr->stream_name ) free( mdpr->stream_name ); free( mdpr->stream_name );
free( mdpr ); free( mdpr );
return NULL; return NULL;
} }
...@@ -609,15 +609,15 @@ void rmff_free_header(rmff_header_t *h) ...@@ -609,15 +609,15 @@ void rmff_free_header(rmff_header_t *h)
{ {
if (!h) return; if (!h) return;
if (h->fileheader) free(h->fileheader); free( h->fileheader );
if (h->prop) free(h->prop); free( h->prop );
if (h->data) free(h->data); free( h->data );
if (h->cont) { if( h->cont ) {
free(h->cont->title); free( h->cont->title );
free(h->cont->author); free( h->cont->author );
free(h->cont->copyright); free( h->cont->copyright );
free(h->cont->comment); free( h->cont->comment );
free(h->cont); free( h->cont );
} }
if (h->streams) { if (h->streams) {
rmff_mdpr_t **s=h->streams; rmff_mdpr_t **s=h->streams;
......
...@@ -209,14 +209,14 @@ static sdpplin_stream_t *sdpplin_parse_stream(char **data) { ...@@ -209,14 +209,14 @@ static sdpplin_stream_t *sdpplin_parse_stream(char **data) {
*data=nl(*data); *data=nl(*data);
} }
} }
if( buf ) free(buf); free( buf );
if( decoded )free(decoded); free( decoded) ;
return desc; return desc;
error: error:
if( decoded ) free(decoded); free( decoded );
if( desc ) free( desc ); free( desc );
if( buf ) free( buf ); free( buf );
return NULL; return NULL;
} }
...@@ -312,8 +312,8 @@ sdpplin_t *sdpplin_parse(char *data) { ...@@ -312,8 +312,8 @@ sdpplin_t *sdpplin_parse(char *data) {
} }
} }
free(decoded); free( decoded );
free(buf); free( buf );
return desc; return desc;
} }
...@@ -325,36 +325,36 @@ void sdpplin_free(sdpplin_t *description) { ...@@ -325,36 +325,36 @@ void sdpplin_free(sdpplin_t *description) {
for( i=0; i<description->stream_count; i++ ) { for( i=0; i<description->stream_count; i++ ) {
if( description->stream[i] ) { if( description->stream[i] ) {
if( description->stream[i]->id ) free( description->stream[i]->id ); free( description->stream[i]->id );
if( description->stream[i]->bandwidth ) free( description->stream[i]->bandwidth ); free( description->stream[i]->bandwidth );
if( description->stream[i]->range ) free( description->stream[i]->range ); free( description->stream[i]->range );
if( description->stream[i]->length ) free( description->stream[i]->length ); free( description->stream[i]->length );
if( description->stream[i]->rtpmap ) free( description->stream[i]->rtpmap ); free( description->stream[i]->rtpmap );
if( description->stream[i]->mimetype ) free( description->stream[i]->mimetype ); free( description->stream[i]->mimetype );
if( description->stream[i]->stream_name ) free( description->stream[i]->stream_name ); free( description->stream[i]->stream_name );
if( description->stream[i]->mime_type ) free( description->stream[i]->mime_type ); free( description->stream[i]->mime_type );
if( description->stream[i]->mlti_data ) free( description->stream[i]->mlti_data ); free( description->stream[i]->mlti_data );
if( description->stream[i]->rmff_flags ) free( description->stream[i]->rmff_flags ); free( description->stream[i]->rmff_flags );
if( description->stream[i]->asm_rule_book ) free( description->stream[i]->asm_rule_book ); free( description->stream[i]->asm_rule_book );
free( description->stream[i] ); free( description->stream[i] );
} }
} }
if( description->stream_count ) free( description->stream ); if( description->stream_count ) free( description->stream );
if( description->owner ) free( description->owner ); free( description->owner );
if( description->session_name ) free( description->session_name ); free( description->session_name );
if( description->session_info ) free( description->session_info ); free( description->session_info );
if( description->uri ) free( description->uri ); free( description->uri );
if( description->email ) free( description->email ); free( description->email );
if( description->phone ) free( description->phone ); free( description->phone );
if( description->connection ) free( description->connection ); free( description->connection );
if( description->bandwidth ) free( description->bandwidth ); free( description->bandwidth );
if( description->title ) free( description->title ); free( description->title );
if( description->author ) free( description->author ); free( description->author );
if( description->copyright ) free( description->copyright ); free( description->copyright );
if( description->keywords ) free( description->keywords ); free( description->keywords );
if( description->asm_rule_book ) free( description->asm_rule_book ); free( description->asm_rule_book );
if( description->abstract ) free( description->abstract ); free( description->abstract );
if( description->range ) free( description->range ); free( description->range );
free(description); free(description);
} }
...@@ -240,7 +240,7 @@ static int rtsp_get_answers( rtsp_client_t *rtsp ) ...@@ -240,7 +240,7 @@ static int rtsp_get_answers( rtsp_client_t *rtsp )
{ {
char *buf = malloc( strlen(answer) ); char *buf = malloc( strlen(answer) );
sscanf( answer, "%*s %s", buf ); sscanf( answer, "%*s %s", buf );
if( rtsp->p_private->server ) free( rtsp->p_private->server ); free( rtsp->p_private->server );
rtsp->p_private->server = buf; rtsp->p_private->server = buf;
} }
if( !strncasecmp( answer, "Session:", 8 ) ) if( !strncasecmp( answer, "Session:", 8 ) )
...@@ -559,12 +559,12 @@ void rtsp_close( rtsp_client_t *rtsp ) ...@@ -559,12 +559,12 @@ void rtsp_close( rtsp_client_t *rtsp )
rtsp->pf_disconnect( rtsp->p_userdata ); rtsp->pf_disconnect( rtsp->p_userdata );
} }
if( rtsp->p_private->path ) free( rtsp->p_private->path ); free( rtsp->p_private->path );
if( rtsp->p_private->host ) free( rtsp->p_private->host ); free( rtsp->p_private->host );
if( rtsp->p_private->mrl ) free( rtsp->p_private->mrl ); free( rtsp->p_private->mrl );
if( rtsp->p_private->session ) free( rtsp->p_private->session ); free( rtsp->p_private->session );
if( rtsp->p_private->user_agent ) free( rtsp->p_private->user_agent ); free( rtsp->p_private->user_agent );
if( rtsp->p_private->server ) free( rtsp->p_private->server ); free( rtsp->p_private->server );
rtsp_free_answers( rtsp ); rtsp_free_answers( rtsp );
rtsp_unschedule_all( rtsp ); rtsp_unschedule_all( rtsp );
free( rtsp->p_private ); free( rtsp->p_private );
...@@ -604,7 +604,7 @@ char *rtsp_search_answers( rtsp_client_t *rtsp, const char *tag ) ...@@ -604,7 +604,7 @@ char *rtsp_search_answers( rtsp_client_t *rtsp, const char *tag )
void rtsp_set_session( rtsp_client_t *rtsp, const char *id ) void rtsp_set_session( rtsp_client_t *rtsp, const char *id )
{ {
if( rtsp->p_private->session ) free( rtsp->p_private->session ); free( rtsp->p_private->session );
rtsp->p_private->session = strdup(id); rtsp->p_private->session = strdup(id);
} }
...@@ -647,7 +647,7 @@ void rtsp_unschedule_field( rtsp_client_t *rtsp, const char *string ) ...@@ -647,7 +647,7 @@ void rtsp_unschedule_field( rtsp_client_t *rtsp, const char *string )
{ {
if( !strncmp(*ptr, string, strlen(string)) ) break; if( !strncmp(*ptr, string, strlen(string)) ) break;
} }
if( *ptr ) free( *ptr ); free( *ptr );
ptr++; ptr++;
do do
{ {
......
...@@ -188,11 +188,11 @@ static int Open( vlc_object_t *p_this ) ...@@ -188,11 +188,11 @@ static int Open( vlc_object_t *p_this )
* smb://[[[domain;]user[:password@]]server[/share[/path[/file]]]] */ * smb://[[[domain;]user[:password@]]server[/share[/path[/file]]]] */
if( !psz_user ) psz_user = var_CreateGetString( p_access, "smb-user" ); if( !psz_user ) psz_user = var_CreateGetString( p_access, "smb-user" );
if( psz_user && !*psz_user ) { free( psz_user ); psz_user = 0; } if( !*psz_user ) { free( psz_user ); psz_user = 0; }
if( !psz_pwd ) psz_pwd = var_CreateGetString( p_access, "smb-pwd" ); if( !psz_pwd ) psz_pwd = var_CreateGetString( p_access, "smb-pwd" );
if( psz_pwd && !*psz_pwd ) { free( psz_pwd ); psz_pwd = 0; } if( !*psz_pwd ) { free( psz_pwd ); psz_pwd = 0; }
if(!psz_domain) psz_domain = var_CreateGetString( p_access, "smb-domain" ); if(!psz_domain) psz_domain = var_CreateGetString( p_access, "smb-domain" );
if( psz_domain && !*psz_domain ) { free( psz_domain ); psz_domain = 0; } if( !*psz_domain ) { free( psz_domain ); psz_domain = 0; }
#ifdef WIN32 #ifdef WIN32
if( psz_user ) if( psz_user )
...@@ -208,9 +208,9 @@ static int Open( vlc_object_t *p_this ) ...@@ -208,9 +208,9 @@ static int Open( vlc_object_t *p_this )
asprintf( &psz_uri, "smb://%s", psz_path ); asprintf( &psz_uri, "smb://%s", psz_path );
#endif #endif
if( psz_user ) free( psz_user ); free( psz_user );
if( psz_pwd ) free( psz_pwd ); free( psz_pwd );
if( psz_domain ) free( psz_domain ); free( psz_domain );
#ifdef USE_CTX #ifdef USE_CTX
if( !(p_smb = smbc_new_context()) ) if( !(p_smb = smbc_new_context()) )
......
...@@ -431,14 +431,14 @@ static int Open( vlc_object_t *p_this ) ...@@ -431,14 +431,14 @@ static int Open( vlc_object_t *p_this )
p_sys->fd_audio = OpenAudioDev( p_demux, p_sys->psz_device ); p_sys->fd_audio = OpenAudioDev( p_demux, p_sys->psz_device );
if( p_sys->fd_audio >= 0 ) if( p_sys->fd_audio >= 0 )
{ {
if( p_sys->psz_adev ) free( p_sys->psz_adev ); free( p_sys->psz_adev );
p_sys->psz_adev = p_sys->psz_device; p_sys->psz_adev = p_sys->psz_device;
p_sys->psz_device = NULL; p_sys->psz_device = NULL;
} }
} }
else else
{ {
if( p_sys->psz_vdev ) free( p_sys->psz_vdev ); free( p_sys->psz_vdev );
p_sys->psz_vdev = p_sys->psz_device; p_sys->psz_vdev = p_sys->psz_device;
p_sys->psz_device = NULL; p_sys->psz_device = NULL;
} }
...@@ -459,7 +459,7 @@ static int Open( vlc_object_t *p_this ) ...@@ -459,7 +459,7 @@ static int Open( vlc_object_t *p_this )
{ {
if( !p_sys->psz_vdev || !*p_sys->psz_vdev ) if( !p_sys->psz_vdev || !*p_sys->psz_vdev )
{ {
if( p_sys->psz_vdev ) free( p_sys->psz_vdev ); free( p_sys->psz_vdev );
p_sys->psz_vdev = var_CreateGetString( p_demux, "v4l-vdev" );; p_sys->psz_vdev = var_CreateGetString( p_demux, "v4l-vdev" );;
} }
...@@ -474,7 +474,7 @@ static int Open( vlc_object_t *p_this ) ...@@ -474,7 +474,7 @@ static int Open( vlc_object_t *p_this )
{ {
if( !p_sys->psz_adev || !*p_sys->psz_adev ) if( !p_sys->psz_adev || !*p_sys->psz_adev )
{ {
if( p_sys->psz_adev ) free( p_sys->psz_adev ); free( p_sys->psz_adev );
p_sys->psz_adev = var_CreateGetString( p_demux, "v4l-adev" );; p_sys->psz_adev = var_CreateGetString( p_demux, "v4l-adev" );;
} }
...@@ -548,9 +548,9 @@ static void Close( vlc_object_t *p_this ) ...@@ -548,9 +548,9 @@ static void Close( vlc_object_t *p_this )
demux_t *p_demux = (demux_t *)p_this; demux_t *p_demux = (demux_t *)p_this;
demux_sys_t *p_sys = p_demux->p_sys; demux_sys_t *p_sys = p_demux->p_sys;
if( p_sys->psz_device ) free( p_sys->psz_device ); free( p_sys->psz_device );
if( p_sys->psz_vdev ) free( p_sys->psz_vdev ); free( p_sys->psz_vdev );
if( p_sys->psz_adev ) free( p_sys->psz_adev ); free( p_sys->psz_adev );
if( p_sys->fd_video >= 0 ) close( p_sys->fd_video ); if( p_sys->fd_video >= 0 ) close( p_sys->fd_video );
if( p_sys->fd_audio >= 0 ) close( p_sys->fd_audio ); if( p_sys->fd_audio >= 0 ) close( p_sys->fd_audio );
if( p_sys->p_block_audio ) block_Release( p_sys->p_block_audio ); if( p_sys->p_block_audio ) block_Release( p_sys->p_block_audio );
...@@ -866,7 +866,7 @@ static void ParseMRL( demux_t *p_demux ) ...@@ -866,7 +866,7 @@ static void ParseMRL( demux_t *p_demux )
{ {
p_sys->psz_device = strdup( psz_dup ); p_sys->psz_device = strdup( psz_dup );
} }
if( psz_dup ) free( psz_dup ); free( psz_dup );
} }
/***************************************************************************** /*****************************************************************************
......
...@@ -610,7 +610,7 @@ static int FindMainDevice( vlc_object_t *p_this, demux_sys_t *p_sys, ...@@ -610,7 +610,7 @@ static int FindMainDevice( vlc_object_t *p_this, demux_sys_t *p_sys,
{ {
msg_Dbg( p_this, "'%s' is a video device", p_sys->psz_device ); msg_Dbg( p_this, "'%s' is a video device", p_sys->psz_device );
/* Device was a video device */ /* Device was a video device */
if( p_sys->psz_vdev ) free( p_sys->psz_vdev ); free( p_sys->psz_vdev );
p_sys->psz_vdev = p_sys->psz_device; p_sys->psz_vdev = p_sys->psz_device;
p_sys->psz_device = NULL; p_sys->psz_device = NULL;
p_sys->i_fd_video = OpenVideoDev( p_this, p_sys, b_demux ); p_sys->i_fd_video = OpenVideoDev( p_this, p_sys, b_demux );
...@@ -653,7 +653,7 @@ static int FindMainDevice( vlc_object_t *p_this, demux_sys_t *p_sys, ...@@ -653,7 +653,7 @@ static int FindMainDevice( vlc_object_t *p_this, demux_sys_t *p_sys,
{ {
if( !p_sys->psz_vdev || !*p_sys->psz_vdev ) if( !p_sys->psz_vdev || !*p_sys->psz_vdev )
{ {
if( p_sys->psz_vdev ) free( p_sys->psz_vdev ); free( p_sys->psz_vdev );
p_sys->psz_vdev = var_CreateGetString( p_this, "v4l2-dev" ); p_sys->psz_vdev = var_CreateGetString( p_this, "v4l2-dev" );
} }
...@@ -862,7 +862,7 @@ static void ParseMRL( demux_sys_t *p_sys, char *psz_path, vlc_object_t *p_obj ) ...@@ -862,7 +862,7 @@ static void ParseMRL( demux_sys_t *p_sys, char *psz_path, vlc_object_t *p_obj )
i_len = strlen( psz_parser ); i_len = strlen( psz_parser );
} }
if( p_sys->psz_requested_chroma ) free( p_sys->psz_requested_chroma ); free( p_sys->psz_requested_chroma );
p_sys->psz_requested_chroma = strndup( psz_parser, i_len ); p_sys->psz_requested_chroma = strndup( psz_parser, i_len );
psz_parser += i_len; psz_parser += i_len;
...@@ -1053,7 +1053,7 @@ static void ParseMRL( demux_sys_t *p_sys, char *psz_path, vlc_object_t *p_obj ) ...@@ -1053,7 +1053,7 @@ static void ParseMRL( demux_sys_t *p_sys, char *psz_path, vlc_object_t *p_obj )
{ {
p_sys->psz_device = strdup( psz_dup ); p_sys->psz_device = strdup( psz_dup );
} }
if( psz_dup ) free( psz_dup ); free( psz_dup );
} }
/***************************************************************************** /*****************************************************************************
......
...@@ -162,7 +162,7 @@ vcddev_t *ioctl_Open( vlc_object_t *p_this, const char *psz_dev ) ...@@ -162,7 +162,7 @@ vcddev_t *ioctl_Open( vlc_object_t *p_this, const char *psz_dev )
*****************************************************************************/ *****************************************************************************/
void ioctl_Close( vlc_object_t * p_this, vcddev_t *p_vcddev ) void ioctl_Close( vlc_object_t * p_this, vcddev_t *p_vcddev )
{ {
if( p_vcddev->psz_dev ) free( p_vcddev->psz_dev ); free( p_vcddev->psz_dev );
if( p_vcddev->i_vcdimage_handle != -1 ) if( p_vcddev->i_vcdimage_handle != -1 )
{ {
...@@ -358,8 +358,8 @@ int ioctl_GetTracksMap( vlc_object_t *p_this, const vcddev_t *p_vcddev, ...@@ -358,8 +358,8 @@ int ioctl_GetTracksMap( vlc_object_t *p_this, const vcddev_t *p_vcddev,
if( *pp_sectors == NULL || p_fulltoc == NULL ) if( *pp_sectors == NULL || p_fulltoc == NULL )
{ {
if( *pp_sectors ) free( *pp_sectors ); free( *pp_sectors );
if( p_fulltoc ) free( p_fulltoc ); free( p_fulltoc );
msg_Err( p_this, "out of memory" ); msg_Err( p_this, "out of memory" );
CloseHandle( hEvent ); CloseHandle( hEvent );
return 0; return 0;
...@@ -972,8 +972,8 @@ static int OpenVCDImage( vlc_object_t * p_this, const char *psz_dev, ...@@ -972,8 +972,8 @@ static int OpenVCDImage( vlc_object_t * p_this, const char *psz_dev,
error: error:
if( cuefile ) fclose( cuefile ); if( cuefile ) fclose( cuefile );
if( psz_cuefile ) free( psz_cuefile ); free( psz_cuefile );
if( psz_vcdfile ) free( psz_vcdfile ); free( psz_vcdfile );
return i_ret; return i_ret;
} }
...@@ -988,8 +988,7 @@ static void CloseVCDImage( vlc_object_t * p_this, vcddev_t *p_vcddev ) ...@@ -988,8 +988,7 @@ static void CloseVCDImage( vlc_object_t * p_this, vcddev_t *p_vcddev )
else else
return; return;
if( p_vcddev->p_sectors ) free( p_vcddev->p_sectors );
free( p_vcddev->p_sectors );
} }
#if defined( __APPLE__ ) #if defined( __APPLE__ )
......
...@@ -243,7 +243,7 @@ static void Close( vlc_object_t *p_this ) ...@@ -243,7 +243,7 @@ static void Close( vlc_object_t *p_this )
if( p_sys ) if( p_sys )
{ {
if( p_sys->p_last) free( p_sys->p_last ); free( p_sys->p_last );
free( p_sys ); free( p_sys );
} }
} }
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