]> git.sesse.net Git - vlc/commitdiff
macosx: Fix a couple of object leak in the equalizer.
authorPierre d'Herbemont <pdherbemont@videolan.org>
Fri, 15 Aug 2008 11:40:22 +0000 (13:40 +0200)
committerPierre d'Herbemont <pdherbemont@videolan.org>
Fri, 15 Aug 2008 11:40:41 +0000 (13:40 +0200)
modules/gui/macosx/equalizer.m

index 68d6e9d00ed972ced73f94894dd86db5bd584f0e..78adadd89f881f6ebf56e8b2f5a47a3ab889a5f7 100644 (file)
@@ -52,8 +52,10 @@ static void ChangeFiltersString( intf_thread_t *p_intf,
     vlc_object_t *p_object = vlc_object_find( p_intf,
                                 VLC_OBJECT_AOUT, FIND_ANYWHERE );
     aout_instance_t *p_aout = (aout_instance_t *)p_object;
-    if( p_object == NULL )
+    if( !p_object )
+    {
         p_object = (vlc_object_t *)pl_Yield( p_intf );
+    }
 
     psz_string = var_GetNonEmptyString( p_object, "audio-filter" );
 
@@ -72,6 +74,7 @@ static void ChangeFiltersString( intf_thread_t *p_intf,
         }
         else
         {
+            vlc_object_release( p_object );
             return;
         }
     }
@@ -90,8 +93,9 @@ static void ChangeFiltersString( intf_thread_t *p_intf,
          }
          else
          {
-             free( psz_string );
-             return;
+            free( psz_string );
+            vlc_object_release( p_object );
+            return;
          }
     }