Commit 911511bd authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

- WTF?! Do not use non-existant vlc_closedir_wrapper

- Do not leak result from utf8_readdir (ALWAYS strdup'ed).
parent 65c24e0d
......@@ -1547,9 +1547,9 @@ static int Open( vlc_object_t * p_this )
}
}
}
LocaleFree (psz_file);
free (psz_file);
}
vlc_closedir_wrapper( p_src_dir );
closedir( p_src_dir );
}
}
......
......@@ -1995,7 +1995,7 @@ static void ReadDir( intf_thread_t *p_intf )
qsort( p_sys->pp_dir_entries, p_sys->i_dir_entries,
sizeof(struct dir_entry_t*), &comp_dir_entries );
vlc_closedir_wrapper( p_current_dir );
closedir( p_current_dir );
return;
}
else
......
......@@ -597,7 +597,7 @@ gnutls_Addx509Directory( vlc_object_t *p_this,
|| fstat( fd, &st1 ) || utf8_lstat( psz_dirname, &st2 )
|| S_ISLNK( st2.st_mode ) || ( st1.st_ino != st2.st_ino ) )
{
vlc_closedir_wrapper( dir );
closedir( dir );
return VLC_EGENERIC;
}
}
......@@ -619,7 +619,7 @@ gnutls_Addx509Directory( vlc_object_t *p_this,
gnutls_Addx509File( p_this, cred, path, b_priv );
}
vlc_closedir_wrapper( dir );
closedir( dir );
return VLC_SUCCESS;
}
......
......@@ -436,7 +436,8 @@ int utf8_mkdir( const char *dirname )
*
* @param dirname UTF-8 representation of the directory name
*
* @return a pointer to the DIR struct. Use vlc_closedir_wrapper() once you are done.
* @return a pointer to the DIR struct. Release with closedir().
*/
DIR *utf8_opendir( const char *dirname )
{
#ifdef WIN32
......@@ -531,7 +532,7 @@ int utf8_scandir( const char *dirname, char ***namelist,
tab = newtab;
tab[num++] = entry;
}
vlc_closedir_wrapper( dir );
closedir( dir );
if( compar != NULL )
qsort( tab, num, sizeof( tab[0] ),
......
......@@ -637,7 +637,7 @@ int vout_Snapshot( vout_thread_t *p_vout, picture_t *p_pic )
char *psz_prefix = var_GetString( p_vout, "snapshot-prefix" );
if( !psz_prefix ) psz_prefix = strdup( "vlcsnap-" );
vlc_closedir_wrapper( path );
closedir( path );
if( var_GetBool( p_vout, "snapshot-sequential" ) == VLC_TRUE )
{
int i_num = var_GetInteger( p_vout, "snapshot-num" );
......
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