Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-2-2
Commits
84feac28
Commit
84feac28
authored
Dec 02, 2013
by
Rémi Duraffort
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lua sd: fix potential memory leaks (cdi #1048936)
parent
884edd40
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
modules/lua/libs/sd.c
modules/lua/libs/sd.c
+4
-2
No files found.
modules/lua/libs/sd.c
View file @
84feac28
...
@@ -347,7 +347,6 @@ static int vlclua_node_add_subitem( lua_State *L )
...
@@ -347,7 +347,6 @@ static int vlclua_node_add_subitem( lua_State *L )
lua_pushvalue
(
L
,
-
2
);
lua_pushvalue
(
L
,
-
2
);
vlclua_read_options
(
p_sd
,
L
,
&
i_options
,
&
ppsz_options
);
vlclua_read_options
(
p_sd
,
L
,
&
i_options
,
&
ppsz_options
);
input_item_node_t
*
p_input_node
=
input_item_node_Create
(
*
pp_node
);
input_item_t
*
p_input
=
input_item_NewExt
(
psz_path
,
input_item_t
*
p_input
=
input_item_NewExt
(
psz_path
,
psz_path
,
i_options
,
psz_path
,
i_options
,
(
const
char
**
)
ppsz_options
,
(
const
char
**
)
ppsz_options
,
...
@@ -356,6 +355,8 @@ static int vlclua_node_add_subitem( lua_State *L )
...
@@ -356,6 +355,8 @@ static int vlclua_node_add_subitem( lua_State *L )
if
(
p_input
)
if
(
p_input
)
{
{
input_item_node_t
*
p_input_node
=
input_item_node_Create
(
*
pp_node
);
vlclua_read_meta_data
(
p_sd
,
L
,
p_input
);
vlclua_read_meta_data
(
p_sd
,
L
,
p_input
);
/* This one is to be tested... */
/* This one is to be tested... */
vlclua_read_custom_meta_data
(
p_sd
,
L
,
p_input
);
vlclua_read_custom_meta_data
(
p_sd
,
L
,
p_input
);
...
@@ -406,7 +407,6 @@ static int vlclua_node_add_subnode( lua_State *L )
...
@@ -406,7 +407,6 @@ static int vlclua_node_add_subnode( lua_State *L )
if
(
lua_isstring
(
L
,
-
1
)
)
if
(
lua_isstring
(
L
,
-
1
)
)
{
{
const
char
*
psz_name
=
lua_tostring
(
L
,
-
1
);
const
char
*
psz_name
=
lua_tostring
(
L
,
-
1
);
input_item_node_t
*
p_input_node
=
input_item_node_Create
(
*
pp_node
);
input_item_t
*
p_input
=
input_item_NewWithType
(
"vlc://nop"
,
input_item_t
*
p_input
=
input_item_NewWithType
(
"vlc://nop"
,
psz_name
,
0
,
NULL
,
0
,
psz_name
,
0
,
NULL
,
0
,
-
1
,
ITEM_TYPE_NODE
);
-
1
,
ITEM_TYPE_NODE
);
...
@@ -414,6 +414,8 @@ static int vlclua_node_add_subnode( lua_State *L )
...
@@ -414,6 +414,8 @@ static int vlclua_node_add_subnode( lua_State *L )
if
(
p_input
)
if
(
p_input
)
{
{
input_item_node_t
*
p_input_node
=
input_item_node_Create
(
*
pp_node
);
lua_getfield
(
L
,
-
1
,
"arturl"
);
lua_getfield
(
L
,
-
1
,
"arturl"
);
if
(
lua_isstring
(
L
,
-
1
)
&&
strcmp
(
lua_tostring
(
L
,
-
1
),
""
)
)
if
(
lua_isstring
(
L
,
-
1
)
&&
strcmp
(
lua_tostring
(
L
,
-
1
),
""
)
)
{
{
...
...
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