Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
GSoC
GSoC2018
macOS
vlc
Commits
4106f477
Commit
4106f477
authored
May 05, 2010
by
JPeg
Browse files
Extensions: fix a leak (and a potential crash)
parent
45ea8ad0
Changes
1
Hide whitespace changes
Inline
Side-by-side
modules/misc/lua/extension_thread.c
View file @
4106f477
...
...
@@ -277,9 +277,11 @@ int __PushCommand( extension_t *p_ext, bool b_unique, int i_command,
}
if
(
!
b_skip
)
{
if
(
!
b_unique
||
(
last
->
i_command
!=
i_command
)
||
memcmp
(
last
->
data
,
cmd
->
data
,
sizeof
(
cmd
->
data
)
)
!=
0
)
last
->
next
=
cmd
;
last
->
next
=
cmd
;
}
else
{
FreeCommands
(
cmd
);
}
}
...
...
@@ -394,8 +396,9 @@ static void* Run( void *data )
}
vlc_mutex_lock
(
&
p_ext
->
p_sys
->
command_lock
);
if
(
cm
d
)
if
(
p_ext
->
p_sys
->
comman
d
)
{
cmd
=
p_ext
->
p_sys
->
command
;
p_ext
->
p_sys
->
command
=
cmd
->
next
;
cmd
->
next
=
NULL
;
// This prevents FreeCommands from freeing next
FreeCommands
(
cmd
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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