aboutsummaryrefslogtreecommitdiffstats
path: root/src/decoder
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2010-05-31 10:22:08 +0200
committerMax Kellermann <max@duempel.org>2010-05-31 10:22:08 +0200
commit2c1c5888683197dba3477487ca49727fd48fbac6 (patch)
treed55f855d8016dbfdebfa6c464254d5c4419f8718 /src/decoder
parente271f69a3469d91397714f14614bdf5796458dd1 (diff)
downloadmpd-2c1c5888683197dba3477487ca49727fd48fbac6.tar.gz
mpd-2c1c5888683197dba3477487ca49727fd48fbac6.tar.xz
mpd-2c1c5888683197dba3477487ca49727fd48fbac6.zip
decoder/mikmod: duplicate the path only once
Diffstat (limited to '')
-rw-r--r--src/decoder/mikmod_decoder_plugin.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/decoder/mikmod_decoder_plugin.c b/src/decoder/mikmod_decoder_plugin.c
index c3d2ae4b0..5cbfa23dd 100644
--- a/src/decoder/mikmod_decoder_plugin.c
+++ b/src/decoder/mikmod_decoder_plugin.c
@@ -181,9 +181,9 @@ mikmod_decoder_tag_dup(const char *path_fs)
{
char *path2 = g_strdup(path_fs);
MODULE *handle = Player_Load(path2, 128, 0);
- g_free(path2);
if (handle == NULL) {
+ g_free(path2);
g_debug("Failed to open file: %s", path_fs);
return NULL;
@@ -195,9 +195,9 @@ mikmod_decoder_tag_dup(const char *path_fs)
tag->time = 0;
- path2 = g_strdup(path_fs);
char *title = g_strdup(Player_LoadTitle(path2));
g_free(path2);
+
if (title)
tag_add_item(tag, TAG_TITLE, title);