From 45418583e9d73f4f0cae52c5726566cf80d9ba42 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 15 Oct 2013 22:25:32 +0200 Subject: ApeTag: use std::string for temporary allocation --- src/tag/ApeTag.cxx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/tag/ApeTag.cxx') 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 +#include #include @@ -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; } -- cgit v1.2.3