]> git.sesse.net Git - vlc/commitdiff
* Fix free of the directory listing of the subtitle scan.
authorDerk-Jan Hartman <hartman@videolan.org>
Sun, 15 Jan 2006 20:52:30 +0000 (20:52 +0000)
committerDerk-Jan Hartman <hartman@videolan.org>
Sun, 15 Jan 2006 20:52:30 +0000 (20:52 +0000)
src/input/subtitles.c

index 155e386111450979429875d84694fb0f65eb8252..46e7326916ea0c85837bd5bb77a923cc47e9d29a 100644 (file)
@@ -411,11 +411,10 @@ char **subtitles_Detect( input_thread_t *p_this, char *psz_path,
                 }
                 if( i_sub_count >= MAX_SUBTITLE_FILES ) break;
                 free( p_fixed_name );
-
-                for( a = 0; a < i_dir_content; a++ )
-                    if( pp_dir_content[a] ) free( pp_dir_content[a] );
-                if( pp_dir_content ) free( pp_dir_content );
             }
+            for( a = 0; a < i_dir_content; a++ )
+                if( pp_dir_content[a] ) free( pp_dir_content[a] );
+            if( pp_dir_content ) free( pp_dir_content );
         }
         if( j >= 0 ) free( *subdirs++ );
     }