vlc | branch: master | Rémi Duraffort <[email protected]> | Sat Jul 13 
19:30:01 2013 +0200| [db67442b62d640cdb29446649fc94cec1069da80] | committer: 
Rémi Duraffort

access_jack: cleaning

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=db67442b62d640cdb29446649fc94cec1069da80
---

 modules/access/jack.c |   12 +++---------
 1 file changed, 3 insertions(+), 9 deletions(-)

diff --git a/modules/access/jack.c b/modules/access/jack.c
index b0e3026..12e0710 100644
--- a/modules/access/jack.c
+++ b/modules/access/jack.c
@@ -519,30 +519,24 @@ static void Port_finder( demux_t *p_demux )
         pp_jack_port_output = jack_get_ports( p_sys->p_jack_client,
            psz_uri, NULL, JackPortIsOutput );
         if( pp_jack_port_output == NULL )
-        {
             msg_Err( p_demux, "port(s) asked not found:%s", psz_uri );
-            free( pp_jack_port_output );
-        }
         else
         {
-            while( pp_jack_port_output && pp_jack_port_output[i_out_ports] )
-            {
+            while( pp_jack_port_output[i_out_ports] )
                 i_out_ports++;
-            }
             /* alloc an array to store all the matched ports */
             p_sys->pp_jack_port_table = xrealloc( p_sys->pp_jack_port_table,
                 (i_out_ports * sizeof( char * ) + i_total_out_ports * sizeof( 
char * ) ) );
 
             for(int i=0; i<i_out_ports;i++)
-            {
                 p_sys->pp_jack_port_table[i_total_out_ports+i] = ( char * ) 
pp_jack_port_output[i];
-            }
 
             i_total_out_ports += i_out_ports;
+
+            free( pp_jack_port_output );
         }
     }
 
-    free( pp_jack_port_output );
     p_sys->i_match_ports = i_total_out_ports;
 }
 

_______________________________________________
vlc-commits mailing list
[email protected]
http://mailman.videolan.org/listinfo/vlc-commits

Reply via email to