diff options
author | Max Kellermann <max@duempel.org> | 2013-10-15 22:25:32 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2013-10-15 22:50:02 +0200 |
commit | 45418583e9d73f4f0cae52c5726566cf80d9ba42 (patch) | |
tree | 548178c391b96cd785631f6253c0932ff815a268 | |
parent | 77a11337230ac026a5519b69018fa76fc0462fe9 (diff) | |
download | mpd-45418583e9d73f4f0cae52c5726566cf80d9ba42.tar.gz mpd-45418583e9d73f4f0cae52c5726566cf80d9ba42.tar.xz mpd-45418583e9d73f4f0cae52c5726566cf80d9ba42.zip |
ApeTag: use std::string for temporary allocation
-rw-r--r-- | src/tag/ApeTag.cxx | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/tag/ApeTag.cxx b/src/tag/ApeTag.cxx index acaeada25..266d1546f 100644 --- a/src/tag/ApeTag.cxx +++ b/src/tag/ApeTag.cxx @@ -24,7 +24,7 @@ #include "TagTable.hxx" #include "TagHandler.hxx" -#include <glib.h> +#include <string> #include <string.h> @@ -76,10 +76,9 @@ tag_ape_import_item(unsigned long flags, value = n + 1; } else { - char *p = g_strndup(value, end - value); + const std::string value2(value, end); tag_handler_invoke_tag(handler, handler_ctx, - type, p); - g_free(p); + type, value2.c_str()); recognized = true; break; } |