[vlc-devel] [PATCH] Memory leak in subtitles_Detect() (libvlc)
jmvallat_vlc at mac.com
jmvallat_vlc at mac.com
Wed Dec 14 21:43:16 CET 2005
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
More information about the vlc-devel
mailing list