[vlc-devel] commit: Access/cdda: fix memleak ( Rémi Duraffort )

git version control git at videolan.org
Fri Aug 1 15:46:43 CEST 2008


vlc | branch: master | Rémi Duraffort <ivoire at videolan.org> | Fri Aug  1 12:24:47 2008 +0200| [943b5ccc082784273bc21baa216527a605fc8e04] | committer: Rémi Duraffort 

Access/cdda: fix memleak

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

 modules/access/cdda.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/modules/access/cdda.c b/modules/access/cdda.c
index ba3fdcd..e798d21 100644
--- a/modules/access/cdda.c
+++ b/modules/access/cdda.c
@@ -518,9 +518,11 @@ static void GetCDDBInfo( access_t *p_access, int i_titles, int *p_sectors )
         goto cddb_destroy;
     }
 
+    char* psz_tmp = config_GetPsz( p_access, "cddb-server" );
     cddb_set_email_address( p_cddb, "vlc at videolan.org" );
-    cddb_set_server_name( p_cddb, config_GetPsz( p_access, "cddb-server" ) );
+    cddb_set_server_name( p_cddb, psz_tmp );
     cddb_set_server_port( p_cddb, config_GetInt( p_access, "cddb-port" ) );
+    free( psz_tmp );
 
     /// \todo
     cddb_cache_disable( p_cddb );




More information about the vlc-devel mailing list