Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
5cf35304
Commit
5cf35304
authored
Dec 15, 2008
by
Rémi Duraffort
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix memleak (#2351) (mvar_AppendNewVar already do a strdup of the value);
parent
82c1d83c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
6 deletions
+3
-6
modules/control/http/mvar.c
modules/control/http/mvar.c
+3
-6
No files found.
modules/control/http/mvar.c
View file @
5cf35304
...
@@ -414,16 +414,14 @@ mvar_t *mvar_InputVarSetNew( intf_thread_t *p_intf, char *name,
...
@@ -414,16 +414,14 @@ mvar_t *mvar_InputVarSetNew( intf_thread_t *p_intf, char *name,
for
(
i
=
0
;
i
<
val_list
.
p_list
->
i_count
;
i
++
)
for
(
i
=
0
;
i
<
val_list
.
p_list
->
i_count
;
i
++
)
{
{
char
*
psz
,
psz_int
[
16
];
char
psz_int
[
16
];
mvar_t
*
itm
;
mvar_t
*
itm
;
switch
(
i_type
&
VLC_VAR_TYPE
)
switch
(
i_type
&
VLC_VAR_TYPE
)
{
{
case
VLC_VAR_STRING
:
case
VLC_VAR_STRING
:
itm
=
mvar_New
(
name
,
"set"
);
itm
=
mvar_New
(
name
,
"set"
);
/* FIXME: Memory leak here?? (remove strdup?) */
mvar_AppendNewVar
(
itm
,
"name"
,
text_list
.
p_list
->
p_values
[
i
].
psz_string
);
psz
=
strdup
(
text_list
.
p_list
->
p_values
[
i
].
psz_string
);
mvar_AppendNewVar
(
itm
,
"name"
,
psz
);
mvar_AppendNewVar
(
itm
,
"id"
,
val_list
.
p_list
->
p_values
[
i
].
psz_string
);
mvar_AppendNewVar
(
itm
,
"id"
,
val_list
.
p_list
->
p_values
[
i
].
psz_string
);
snprintf
(
psz_int
,
sizeof
(
psz_int
),
"%d"
,
snprintf
(
psz_int
,
sizeof
(
psz_int
),
"%d"
,
(
!
strcmp
(
val
.
psz_string
,
(
!
strcmp
(
val
.
psz_string
,
...
@@ -435,8 +433,7 @@ mvar_t *mvar_InputVarSetNew( intf_thread_t *p_intf, char *name,
...
@@ -435,8 +433,7 @@ mvar_t *mvar_InputVarSetNew( intf_thread_t *p_intf, char *name,
case
VLC_VAR_INTEGER
:
case
VLC_VAR_INTEGER
:
itm
=
mvar_New
(
name
,
"set"
);
itm
=
mvar_New
(
name
,
"set"
);
psz
=
strdup
(
text_list
.
p_list
->
p_values
[
i
].
psz_string
);
mvar_AppendNewVar
(
itm
,
"name"
,
text_list
.
p_list
->
p_values
[
i
].
psz_string
);
mvar_AppendNewVar
(
itm
,
"name"
,
psz
);
snprintf
(
psz_int
,
sizeof
(
psz_int
),
"%d"
,
snprintf
(
psz_int
,
sizeof
(
psz_int
),
"%d"
,
val_list
.
p_list
->
p_values
[
i
].
i_int
);
val_list
.
p_list
->
p_values
[
i
].
i_int
);
mvar_AppendNewVar
(
itm
,
"id"
,
psz_int
);
mvar_AppendNewVar
(
itm
,
"id"
,
psz_int
);
...
...
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