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
abb28593
Commit
abb28593
authored
Nov 08, 2022
by
gd
Committed by
Max Kellermann
Dec 29, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
TagBuilder::RemoveType: added missing tag pool lock before call to tag_pool_put_item
parent
115693b0
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
0 deletions
+8
-0
NEWS
NEWS
+2
-0
Builder.cxx
src/tag/Builder.cxx
+6
-0
No files found.
NEWS
View file @
abb28593
ver 0.23.12 (not yet released)
ver 0.23.12 (not yet released)
* tags
- fix crash bug due to race condition
ver 0.23.11 (2022/11/28)
ver 0.23.11 (2022/11/28)
* database
* database
...
...
src/tag/Builder.cxx
View file @
abb28593
...
@@ -263,8 +263,14 @@ TagBuilder::RemoveAll() noexcept
...
@@ -263,8 +263,14 @@ TagBuilder::RemoveAll() noexcept
void
void
TagBuilder
::
RemoveType
(
TagType
type
)
noexcept
TagBuilder
::
RemoveType
(
TagType
type
)
noexcept
{
{
if
(
items
.
empty
())
/* don't acquire the tag_pool_lock if we're not going
to call tag_pool_put_item() anyway */
return
;
const
auto
begin
=
items
.
begin
(),
end
=
items
.
end
();
const
auto
begin
=
items
.
begin
(),
end
=
items
.
end
();
const
std
::
scoped_lock
<
Mutex
>
protect
(
tag_pool_lock
);
items
.
erase
(
std
::
remove_if
(
begin
,
end
,
items
.
erase
(
std
::
remove_if
(
begin
,
end
,
[
type
](
TagItem
*
item
)
{
[
type
](
TagItem
*
item
)
{
if
(
item
->
type
!=
type
)
if
(
item
->
type
!=
type
)
...
...
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