]> git.sesse.net Git - vlc/blobdiff - include/vlc_url.h
Don't leak memory when something goes wrong.
[vlc] / include / vlc_url.h
index 3d26ba8dd7412e4edcdf465166cffbbfc665a2c8..c996f3fcc3915ea92860727270599066dfa2216e 100644 (file)
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
-#if !defined( __LIBVLC__ )
-  #error You are not libvlc or one of its plugins. You cannot include this file
-#endif
-
 #ifndef __VLC_URL_H
 # define __VLC_URL_H
 
@@ -182,8 +178,8 @@ static inline void vlc_UrlParse( vlc_url_t *url, const char *psz_url,
  *****************************************************************************/
 static inline void vlc_UrlClean( vlc_url_t *url )
 {
-    if( url->psz_buffer ) free( url->psz_buffer );
-    if( url->psz_host )   free( url->psz_host );
+    free( url->psz_buffer );
+    free( url->psz_host );
 
     url->psz_protocol = NULL;
     url->psz_username = NULL;