Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
Steve Lhomme
VLC
Commits
a6fd99e4
Commit
a6fd99e4
authored
Nov 16, 2016
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lua: fix memory leak when getting/inherting string variable
parent
b8ab8070
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
modules/lua/libs/variables.c
modules/lua/libs/variables.c
+8
-2
No files found.
modules/lua/libs/variables.c
View file @
a6fd99e4
...
...
@@ -128,7 +128,10 @@ static int vlclua_var_inherit( lua_State *L )
return
0
;
lua_pop
(
L
,
2
);
return
vlclua_pushvalue
(
L
,
i_type
,
val
);
vlclua_pushvalue
(
L
,
i_type
,
val
);
if
(
i_type
==
VLC_VAR_STRING
)
free
(
val
.
psz_string
);
return
1
;
}
static
int
vlclua_var_get
(
lua_State
*
L
)
...
...
@@ -142,7 +145,10 @@ static int vlclua_var_get( lua_State *L )
return
0
;
lua_pop
(
L
,
2
);
return
vlclua_pushvalue
(
L
,
i_type
,
val
);
vlclua_pushvalue
(
L
,
i_type
,
val
);
if
(
i_type
==
VLC_VAR_STRING
)
free
(
val
.
psz_string
);
return
1
;
}
static
int
vlclua_var_set
(
lua_State
*
L
)
...
...
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