Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
25431f32
Commit
25431f32
authored
Feb 24, 2014
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
DecoderPlugin: free the container_scan() return value with delete[]
parent
6ba1fe75
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
7 deletions
+5
-7
Container.cxx
src/db/update/Container.cxx
+1
-3
DecoderPlugin.hxx
src/decoder/DecoderPlugin.hxx
+2
-0
SidplayDecoderPlugin.cxx
src/decoder/plugins/SidplayDecoderPlugin.cxx
+2
-4
No files found.
src/db/update/Container.cxx
View file @
25431f32
...
...
@@ -34,8 +34,6 @@
#include <sys/stat.h>
#include <glib.h>
Directory
*
UpdateWalk
::
MakeDirectoryIfModified
(
Directory
&
parent
,
const
char
*
name
,
const
FileInfo
&
info
)
...
...
@@ -120,7 +118,7 @@ UpdateWalk::UpdateContainerFile(Directory &directory,
FormatDefault
(
update_domain
,
"added %s/%s"
,
directory
.
GetPath
(),
vtrack
);
g_free
(
vtrack
)
;
delete
[]
vtrack
;
}
if
(
tnum
==
1
)
{
...
...
src/decoder/DecoderPlugin.hxx
View file @
25431f32
...
...
@@ -95,6 +95,8 @@ struct DecoderPlugin {
* @return nullptr if there are no multiple files
* a filename for every single track according to tnum (param 2)
* do not include full pathname here, just the "virtual" file
*
* Free the return value with delete[].
*/
char
*
(
*
container_scan
)(
Path
path_fs
,
const
unsigned
int
tnum
);
...
...
src/decoder/plugins/SidplayDecoderPlugin.cxx
View file @
25431f32
...
...
@@ -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
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment