[vlc-devel] commit: Memory leaks ( Rémi Denis-Courmont )

git version control git at videolan.org
Sat Jan 17 21:22:23 CET 2009


vlc | branch: master | Rémi Denis-Courmont <rdenis at simphalempin.com> | Sat Jan 17 22:22:15 2009 +0200| [973a412d2429fe488361da641975e68d43d37478] | committer: Rémi Denis-Courmont 

Memory leaks

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

 src/libvlc.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/src/libvlc.c b/src/libvlc.c
index 8ae8005..c11e151 100644
--- a/src/libvlc.c
+++ b/src/libvlc.c
@@ -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 );




More information about the vlc-devel mailing list