]> git.sesse.net Git - vlc/commitdiff
HAL service discovery : fix a memory leak
authorRafaël Carré <rafael.carre@gmail.com>
Mon, 30 Mar 2009 17:52:19 +0000 (19:52 +0200)
committerRafaël Carré <rafael.carre@gmail.com>
Wed, 1 Apr 2009 13:10:19 +0000 (15:10 +0200)
modules/services_discovery/hal.c

index 11ff2284f34137c2306cbb75614359aac08ef094..a21fef8acc9915f7d9b5e1fc6e1f61dadcda50ea 100644 (file)
@@ -125,6 +125,7 @@ static int Open( vlc_object_t *p_this )
     {
         msg_Err( p_sd, "unable to connect to DBUS: %s", dbus_error.message );
         dbus_error_free( &dbus_error );
+        libhal_ctx_free( p_sys->p_ctx );
         free( p_sys );
         return VLC_EGENERIC;
     }
@@ -149,6 +150,7 @@ static int Open( vlc_object_t *p_this )
     return VLC_SUCCESS;
 error:
     dbus_error_free( &dbus_error );
+    libhal_ctx_free( p_sys->p_ctx );
     free( p_sys );
     return VLC_EGENERIC;
 }
@@ -177,6 +179,8 @@ static void Close( vlc_object_t *p_this )
     }
     p_sys->pp_devices = NULL;
 
+    libhal_ctx_free( p_sys->p_ctx );
+
     free( p_sys );
 }