]> git.sesse.net Git - vlc/commitdiff
Memory leaks
authorRémi Denis-Courmont <rdenis@simphalempin.com>
Sat, 17 Jan 2009 20:22:15 +0000 (22:22 +0200)
committerRémi Denis-Courmont <rdenis@simphalempin.com>
Sat, 17 Jan 2009 20:22:15 +0000 (22:22 +0200)
src/libvlc.c

index 8ae8005ca9feb45b001bf0a32fdc231b9224729b..c11e1513f3ded20fbd8b2a0734d9604a5689f2f9 100644 (file)
@@ -430,6 +430,7 @@ int libvlc_InternalInit( libvlc_int_t *p_libvlc, int i_argc,
 
     if( b_exit )
     {
+        free( priv->psz_configfile );
         module_EndBank( p_libvlc );
         return i_ret;
     }
@@ -540,6 +541,7 @@ int libvlc_InternalInit( libvlc_int_t *p_libvlc, int i_argc,
 
     if( b_exit )
     {
+        free( priv->psz_configfile );
         module_EndBank( p_libvlc );
         return i_ret;
     }
@@ -567,6 +569,7 @@ int libvlc_InternalInit( libvlc_int_t *p_libvlc, int i_argc,
                  "that they are valid.\n" );
         PauseConsole();
 #endif
+        free( priv->psz_configfile );
         module_EndBank( p_libvlc );
         return VLC_EGENERIC;
     }
@@ -719,6 +722,7 @@ int libvlc_InternalInit( libvlc_int_t *p_libvlc, int i_argc,
                             "-dontprintthatone\n"
                             "(keyword 'all' to applies to all objects)\n");
                     free( psz_verbose_objects );
+                    /* FIXME: leaks!!!! */
                     return VLC_EGENERIC;
             }
         }
@@ -792,7 +796,7 @@ int libvlc_InternalInit( libvlc_int_t *p_libvlc, int i_argc,
     if( !p_libvlc->p_stats )
     {
         vlc_object_release( p_libvlc );
-        return VLC_ENOMEM;
+        return VLC_ENOMEM; /* FIXME: leaks */
     }
     vlc_mutex_init( &p_libvlc->p_stats->lock );
     priv->p_stats_computer = NULL;
@@ -823,6 +827,7 @@ int libvlc_InternalInit( libvlc_int_t *p_libvlc, int i_argc,
             module_unneed( p_libvlc, priv->p_memcpy_module );
         }
         module_EndBank( p_libvlc );
+        free( priv->psz_configfile );
         return VLC_EGENERIC;
     }
     playlist_Activate( p_playlist );