Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
GSoC
GSoC2018
macOS
vlc
Commits
a67d563f
Commit
a67d563f
authored
Jan 26, 2010
by
ivoire
Browse files
lua: fix potential leak (and missing unlock).
parent
f741dd1b
Changes
2
Hide whitespace changes
Inline
Side-by-side
modules/misc/lua/extension_thread.c
View file @
a67d563f
...
...
@@ -222,7 +222,12 @@ int PushCommand( extension_t *p_ext,
case
CMD_TRIGGERMENU
:
{
int
*
pi
=
malloc
(
sizeof
(
int
)
);
if
(
!
pi
)
return
VLC_ENOMEM
;
if
(
!
pi
)
{
free
(
cmd
);
vlc_mutex_unlock
(
&
p_ext
->
p_sys
->
command_lock
);
return
VLC_ENOMEM
;
}
*
pi
=
va_arg
(
args
,
int
);
cmd
->
data
[
0
]
=
pi
;
}
...
...
modules/misc/lua/libs/dialog.c
View file @
a67d563f
...
...
@@ -163,7 +163,10 @@ static int vlclua_dialog_create( lua_State *L )
lua_getglobal
(
L
,
"vlc"
);
lua_getfield
(
L
,
-
1
,
"__dialog"
);
if
(
lua_topointer
(
L
,
lua_gettop
(
L
)
)
!=
NULL
)
{
free
(
p_dlg
);
return
luaL_error
(
L
,
"Only one dialog allowed per extension!"
);
}
p_dlg
->
p_object
=
p_this
;
p_dlg
->
psz_title
=
strdup
(
psz_title
);
...
...
Write
Preview
Supports
Markdown
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