]> git.sesse.net Git - vlc/commitdiff
When checking for filters overflow, actually handle the error (CID 48)
authorRémi Denis-Courmont <rem@videolan.org>
Fri, 30 May 2008 16:25:22 +0000 (19:25 +0300)
committerRémi Denis-Courmont <rem@videolan.org>
Fri, 30 May 2008 16:25:22 +0000 (19:25 +0300)
src/video_output/vout_subpictures.c

index b76de98ce166fff379bb32c33ea749374d4824dd..a22e2052daff974a40ba73a866520b9085db86d1 100644 (file)
@@ -148,6 +148,8 @@ int spu_ParseChain( spu_t *p_spu )
         p_spu->pp_filter[p_spu->i_filter]->p_module =
             module_Need( p_spu->pp_filter[p_spu->i_filter],
                          "sub filter", psz_name, true );
+        free( psz_name );
+
         if( p_spu->pp_filter[p_spu->i_filter]->p_module )
         {
             filter_owner_sys_t *p_sys = malloc( sizeof(filter_owner_sys_t) );
@@ -170,9 +172,9 @@ int spu_ParseChain( spu_t *p_spu )
         if( p_spu->i_filter >= 10 )
         {
             msg_Dbg( p_spu, "can't add anymore filters" );
+            break;
         }
 
-        free( psz_name );
     }
     free( val.psz_string );