]> git.sesse.net Git - vlc/blobdiff - modules/control/http/macro.c
Input access locking, part 3 (final).
[vlc] / modules / control / http / macro.c
index d220c0ad113891f6c8eb2d16b5600b79380272a1..89ed3c102a114f8cfe113f0868376589d6d9860c 100644 (file)
@@ -335,8 +335,8 @@ void E_(MacroDo)( httpd_file_sys_t *p_args,
 
                     p_input = E_(MRLParse)( p_intf, mrl, psz_name );
 
-                    if( !p_input || !p_input->psz_uri ||
-                        !*p_input->psz_uri )
+                    char *psz_uri = input_item_GetURI( p_input );
+                    if( !p_input || !psz_uri || !*psz_uri )
                     {
                         msg_Dbg( p_intf, "invalid requested mrl: %s", mrl );
                     }
@@ -347,6 +347,7 @@ void E_(MacroDo)( httpd_file_sys_t *p_args,
                                      VLC_FALSE);
                         msg_Dbg( p_intf, "requested mrl add: %s", mrl );
                     }
+                    free( psz_uri );
 
                     break;
                 }