Fix a memory leak
authorRafaël Carré <funman@videolan.org>
Wed, 26 Mar 2008 23:47:42 +0000 (00:47 +0100)
committerRafaël Carré <funman@videolan.org>
Wed, 26 Mar 2008 23:47:42 +0000 (00:47 +0100)
modules/services_discovery/hal.c

index fa23ac3..64d3ace 100644 (file)
@@ -207,7 +207,10 @@ static void AddItem( services_discovery_t *p_sd, input_item_t * p_input
         return;
     p_udi_entry->psz_udi = strdup( psz_device );
     if( !p_udi_entry->psz_udi )
+    {
+        free( p_udi_entry );
         return;
+    }
 
     vlc_gc_incref( p_input );
     p_udi_entry->p_item = p_input;