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
f0faf003
Commit
f0faf003
authored
May 31, 2010
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
decoder/gme: allocate tag later, fixes memory leak
Allocate the "tag" object after the file has been opened successfully.
parent
51c7577c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
gme_decoder_plugin.c
src/decoder/gme_decoder_plugin.c
+1
-1
No files found.
src/decoder/gme_decoder_plugin.c
View file @
f0faf003
...
...
@@ -80,7 +80,6 @@ gme_file_decode(struct decoder *decoder, const char *path_fs)
static
struct
tag
*
gme_tag_dup
(
const
char
*
path_fs
)
{
struct
tag
*
tag
=
tag_new
();
int
sample_rate
=
44100
;
Music_Emu
*
emu
;
gme_info_t
*
ti
;
...
...
@@ -96,6 +95,7 @@ gme_tag_dup(const char *path_fs)
return
NULL
;
}
struct
tag
*
tag
=
tag_new
();
if
(
ti
!=
NULL
){
if
(
ti
->
length
>
0
)
tag
->
time
=
ti
->
length
/
1000
;
...
...
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