diff options
author | Rogério Brito <rbrito@ime.usp.br> | 2011-03-08 15:01:28 -0300 |
---|---|---|
committer | Rogério Brito <rbrito@ime.usp.br> | 2011-03-08 15:01:34 -0300 |
commit | 891b53ce003db7be264bba8b6cd3d547c050099f (patch) | |
tree | e2c9697cc607166d9c93cf385690a997faca9c19 | |
parent | 26cc42d5a92968ed3bbf7b58aa1ea93ec1384fd0 (diff) |
cddb: Plug some memory leaks.
Some of these functions are way, way too big and should be split. One
obvious low hanging fruit is to use some intelligent goto's to clean up and
avoid a bunch of if's in the code, in the very same fashion that is used in
the code of the kernel.
And, to be honest, using some of the coding style conventions of the kernel
here would not hurt at all.
-rw-r--r-- | src/cddb.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -2227,6 +2227,7 @@ gboolean Cddb_Search_Album_List_From_String_Freedb (void) { g_free(string); g_free(cddb_server_name); + g_free(cddb_server_cgi_path); return FALSE; } @@ -2547,6 +2548,7 @@ gboolean Cddb_Search_Album_List_From_String_Gnudb (void) { g_free(string); g_free(cddb_server_name); + g_free(cddb_server_cgi_path); gtk_widget_set_sensitive(GTK_WIDGET(CddbStopSearchButton),FALSE); gtk_widget_set_sensitive(GTK_WIDGET(CddbStopSearchAutoButton),FALSE); return FALSE; @@ -3103,6 +3105,9 @@ gboolean Cddb_Search_Album_From_Selected_Files (void) if ( (socket_id=Cddb_Open_Connection(CDDB_USE_PROXY?CDDB_PROXY_NAME:cddb_server_name, CDDB_USE_PROXY?CDDB_PROXY_PORT:cddb_server_port)) <= 0 ) { + g_free(cddb_in); + g_free(cddb_server_name); + g_free(cddb_server_cgi_path); return FALSE; } |