[vlc-devel] Re: [PATCH] Memory leak in subtitles_Detect() (libvlc)

Derk-Jan Hartman hartman at videolan.org
Thu Dec 15 00:15:29 CET 2005


Modified patch applied troughout VLC source code.
What is your real name if i may ask? i reeally dislike crediting  
people by their email adres :D

DJ

On 14-dec-2005, at 21:43, jmvallat_vlc at mac.com wrote:

>
> In function subtitles_Detect() (file src/input/subtitles.c), the  
> memory allocated by the scandir() function is never released.
>
>
> -- 
>
> Index: src/input/subtitles.c
> ===================================================================
> --- src/input/subtitles.c       (revision 13675)
> +++ src/input/subtitles.c       (working copy)
> @@ -412,6 +412,10 @@
>                  if( i_sub_count >= MAX_SUBTITLE_FILES ) break;
>                  free( p_fixed_name );
>              }
> +
> +            /* scandir() memory clean-up */
> +            for( a = 0; a < i_dir_content; a++ ) free 
> ( pp_dir_content[a] );
> +            free( pp_dir_content );
>          }
>          if( j >= 0 ) free( *subdirs++ );
>      }
>
> -- 
> This is the vlc-devel mailing-list, see http://www.videolan.org/vlc/
> To unsubscribe, please read http://developers.videolan.org/lists.html
>
>

-- 
This is the vlc-devel mailing-list, see http://www.videolan.org/vlc/
To unsubscribe, please read http://developers.videolan.org/lists.html



More information about the vlc-devel mailing list