Commit de8f2739 authored by Max Kellermann's avatar Max Kellermann

decoder/mikmod: fix memory leak

The return value of Player_LoadTitle() is allocated with malloc(), and must be freed by the caller.
parent 2c1c5888
......@@ -39,6 +39,7 @@ ver 0.16 (20??/??/??)
- wavpack: allow more than 2 channels
- mp4ff: rename plugin "mp4" to "mp4ff"
- mp4ff: support tags "albumartist", "band"
- mikmod: fix memory leak
* encoders:
- twolame: new encoder plugin based on libtwolame
- flac: new encoder plugin based on libFLAC
......
......@@ -195,11 +195,13 @@ mikmod_decoder_tag_dup(const char *path_fs)
tag->time = 0;
char *title = g_strdup(Player_LoadTitle(path2));
char *title = Player_LoadTitle(path2);
g_free(path2);
if (title)
if (title != NULL) {
tag_add_item(tag, TAG_TITLE, title);
free(title);
}
return tag;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment