aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/decoder/sidplay_plugin.cxx7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/decoder/sidplay_plugin.cxx b/src/decoder/sidplay_plugin.cxx
index b182a732d..9988b15a8 100644
--- a/src/decoder/sidplay_plugin.cxx
+++ b/src/decoder/sidplay_plugin.cxx
@@ -61,8 +61,10 @@ sidplay_load_songlength_db(const char *path)
data[i] = '#';
GKeyFile *db = g_key_file_new();
- if (!g_key_file_load_from_data(db, data, size,
- G_KEY_FILE_NONE, &error)) {
+ bool success = g_key_file_load_from_data(db, data, size,
+ G_KEY_FILE_NONE, &error);
+ g_free(data);
+ if (!success) {
g_warning("unable to parse songlengths file %s: %s",
path, error->message);
g_error_free(error);
@@ -71,7 +73,6 @@ sidplay_load_songlength_db(const char *path)
}
g_key_file_set_list_separator(db, ' ');
- g_free(data);
return db;
}