From 25431f32a2e75b093b3207c6fce57c7904fc1a96 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Mon, 24 Feb 2014 19:38:30 +0100 Subject: DecoderPlugin: free the container_scan() return value with delete[] --- src/decoder/plugins/SidplayDecoderPlugin.cxx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/decoder/plugins') diff --git a/src/decoder/plugins/SidplayDecoderPlugin.cxx b/src/decoder/plugins/SidplayDecoderPlugin.cxx index 4ae9bc8cd..e3e3b8d96 100644 --- a/src/decoder/plugins/SidplayDecoderPlugin.cxx +++ b/src/decoder/plugins/SidplayDecoderPlugin.cxx @@ -22,7 +22,7 @@ #include "../DecoderAPI.hxx" #include "tag/TagHandler.hxx" #include "fs/Path.hxx" -#include "util/Alloc.hxx" +#include "util/FormatString.hxx" #include "util/Domain.hxx" #include "system/ByteOrder.hxx" #include "Log.hxx" @@ -406,9 +406,7 @@ sidplay_container_scan(Path path_fs, const unsigned int tnum) /* Construct container/tune path names, eg. Delta.sid/tune_001.sid */ if(tnum<=info.songs) { - char *subtune= g_strdup_printf( - SUBTUNE_PREFIX "%03u.sid", tnum); - return subtune; + return FormatNew(SUBTUNE_PREFIX "%03u.sid", tnum); } else return nullptr; } -- cgit v1.2.3