You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/media-sound/mpd/files/mpd-0.17.4-mikmod-crash.patch

31 lines
1013 B

From be3c8154ff9dc309caf41afe917b001e887e2e3e Mon Sep 17 00:00:00 2001
From: Christoph Mende <mende.christoph@gmail.com>
Date: Wed, 10 Apr 2013 10:53:02 +0000
Subject: [PATCH] decoder/mikmod: use MikMod_free() to free the title
Player_LoadTitle() returns an aligned pointer that cannot be freed with
free(). The correct way to free the pointer is MikMod_free() which
extracts the original pointer from the buffer.
Signed-off-by: Christoph Mende <mende.christoph@gmail.com>
---
src/decoder/mikmod_decoder_plugin.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/decoder/mikmod_decoder_plugin.c b/src/decoder/mikmod_decoder_plugin.c
index 5681a7a..5b5a1c6 100644
--- a/src/decoder/mikmod_decoder_plugin.c
+++ b/src/decoder/mikmod_decoder_plugin.c
@@ -200,7 +200,7 @@ mikmod_decoder_scan_file(const char *path_fs,
if (title != NULL) {
tag_handler_invoke_tag(handler, handler_ctx,
TAG_TITLE, title);
- free(title);
+ MikMod_free(title);
}
return true;
--
1.8.1.2