[easytag/wip/unstable: 51/56] Avoid crash when using MusicBrainz CDDB search



commit 021fa4315cacdefbd672169d7d718aad6384c953
Author: David King <amigadave amigadave com>
Date:   Sat Apr 27 16:53:14 2013 +0100

    Avoid crash when using MusicBrainz CDDB search
    
    When running the CDDB search, set the freed server request message
    pointer to NULL to avoid a double free which would occur after making a
    request to the second CDDB server listed in the preferences. Thanks to
    Alexander Shaduri for the report. Fixes bug 699022.

 src/cddb.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/cddb.c b/src/cddb.c
index a0d4a79..0301ddb 100644
--- a/src/cddb.c
+++ b/src/cddb.c
@@ -2793,7 +2793,7 @@ Cddb_Search_Album_From_Selected_Files (void)
     gulong bytes_read_total = 0;
     FILE  *file = NULL;
 
-    gchar *cddb_in;               /* For the request to send */
+    gchar *cddb_in = NULL; /* For the request to send. */
     gchar *cddb_out = NULL;       /* Answer received */
     gchar *cddb_out_tmp;
     gchar *msg;
@@ -3129,6 +3129,7 @@ Cddb_Search_Album_From_Selected_Files (void)
                 return FALSE;
             }
             g_free(cddb_in);
+            cddb_in = NULL;
 
 
             /*


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]