[vlc-devel] commit: Fix a memory leak ( Rafaël Carré )

git version control git at videolan.org
Thu Mar 27 00:47:25 CET 2008


vlc | branch: master | Rafaël Carré <funman at videolan.org> | Thu Mar 27 00:47:42 2008 +0100| [1e36b84e0ce097f69af64dc747b72dab1509cf7c]

Fix a memory leak

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

 modules/services_discovery/hal.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/modules/services_discovery/hal.c b/modules/services_discovery/hal.c
index fa23ac3..64d3ace 100644
--- a/modules/services_discovery/hal.c
+++ b/modules/services_discovery/hal.c
@@ -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;




More information about the vlc-devel mailing list