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
07ce915c
Commit
07ce915c
authored
Feb 08, 2017
by
Max Kellermann
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'v0.20.x'
parents
73f58c57
81a97315
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
9 deletions
+15
-9
NEWS
NEWS
+4
-0
TagId3.cxx
src/tag/TagId3.cxx
+11
-9
No files found.
NEWS
View file @
07ce915c
ver 0.21 (not yet released)
ver 0.21 (not yet released)
ver 0.20.5 (not yet released)
* tags
- id3: fix memory leak on corrupt ID3 tags
ver 0.20.4 (2017/02/01)
ver 0.20.4 (2017/02/01)
* input
* input
- nfs: fix freeze after reconnect
- nfs: fix freeze after reconnect
...
...
src/tag/TagId3.cxx
View file @
07ce915c
...
@@ -24,6 +24,7 @@
...
@@ -24,6 +24,7 @@
#include "TagTable.hxx"
#include "TagTable.hxx"
#include "TagBuilder.hxx"
#include "TagBuilder.hxx"
#include "util/Alloc.hxx"
#include "util/Alloc.hxx"
#include "util/ScopeExit.hxx"
#include "util/StringUtil.hxx"
#include "util/StringUtil.hxx"
#include "Log.hxx"
#include "Log.hxx"
...
@@ -78,11 +79,9 @@ import_id3_string(const id3_ucs4_t *ucs4)
...
@@ -78,11 +79,9 @@ import_id3_string(const id3_ucs4_t *ucs4)
if
(
gcc_unlikely
(
utf8
==
nullptr
))
if
(
gcc_unlikely
(
utf8
==
nullptr
))
return
nullptr
;
return
nullptr
;
id3_utf8_t
*
utf8_stripped
=
(
id3_utf8_t
*
)
AtScopeExit
(
utf8
)
{
free
(
utf8
);
};
xstrdup
(
Strip
((
char
*
)
utf8
));
free
(
utf8
);
return
utf8_stripped
;
return
(
id3_utf8_t
*
)
xstrdup
(
Strip
((
char
*
)
utf8
))
;
}
}
/**
/**
...
@@ -126,9 +125,10 @@ tag_id3_import_text_frame(const struct id3_frame *frame,
...
@@ -126,9 +125,10 @@ tag_id3_import_text_frame(const struct id3_frame *frame,
if
(
utf8
==
nullptr
)
if
(
utf8
==
nullptr
)
continue
;
continue
;
AtScopeExit
(
utf8
)
{
free
(
utf8
);
};
tag_handler_invoke_tag
(
handler
,
handler_ctx
,
tag_handler_invoke_tag
(
handler
,
handler_ctx
,
type
,
(
const
char
*
)
utf8
);
type
,
(
const
char
*
)
utf8
);
free
(
utf8
);
}
}
}
}
...
@@ -177,8 +177,9 @@ tag_id3_import_comment_frame(const struct id3_frame *frame, TagType type,
...
@@ -177,8 +177,9 @@ tag_id3_import_comment_frame(const struct id3_frame *frame, TagType type,
if
(
utf8
==
nullptr
)
if
(
utf8
==
nullptr
)
return
;
return
;
AtScopeExit
(
utf8
)
{
free
(
utf8
);
};
tag_handler_invoke_tag
(
handler
,
handler_ctx
,
type
,
(
const
char
*
)
utf8
);
tag_handler_invoke_tag
(
handler
,
handler_ctx
,
type
,
(
const
char
*
)
utf8
);
free
(
utf8
);
}
}
/**
/**
...
@@ -236,22 +237,23 @@ tag_id3_import_musicbrainz(struct id3_tag *id3_tag,
...
@@ -236,22 +237,23 @@ tag_id3_import_musicbrainz(struct id3_tag *id3_tag,
if
(
name
==
nullptr
)
if
(
name
==
nullptr
)
continue
;
continue
;
AtScopeExit
(
name
)
{
free
(
name
);
};
id3_utf8_t
*
value
=
tag_id3_getstring
(
frame
,
2
);
id3_utf8_t
*
value
=
tag_id3_getstring
(
frame
,
2
);
if
(
value
==
nullptr
)
if
(
value
==
nullptr
)
continue
;
continue
;
AtScopeExit
(
value
)
{
free
(
value
);
};
tag_handler_invoke_pair
(
handler
,
handler_ctx
,
tag_handler_invoke_pair
(
handler
,
handler_ctx
,
(
const
char
*
)
name
,
(
const
char
*
)
name
,
(
const
char
*
)
value
);
(
const
char
*
)
value
);
TagType
type
=
tag_id3_parse_txxx_name
((
const
char
*
)
name
);
TagType
type
=
tag_id3_parse_txxx_name
((
const
char
*
)
name
);
free
(
name
);
if
(
type
!=
TAG_NUM_OF_ITEM_TYPES
)
if
(
type
!=
TAG_NUM_OF_ITEM_TYPES
)
tag_handler_invoke_tag
(
handler
,
handler_ctx
,
tag_handler_invoke_tag
(
handler
,
handler_ctx
,
type
,
(
const
char
*
)
value
);
type
,
(
const
char
*
)
value
);
free
(
value
);
}
}
}
}
...
...
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