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
1497a8a8
Commit
1497a8a8
authored
Oct 05, 2008
by
Rémi Duraffort
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix one potential memleak (CID 195)
parent
f2143d06
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
12 deletions
+9
-12
src/modules/entry.c
src/modules/entry.c
+9
-12
No files found.
src/modules/entry.c
View file @
1497a8a8
...
...
@@ -453,10 +453,6 @@ int vlc_config_set (module_config_t *restrict item, int id, ...)
{
const
char
*
domain
=
va_arg
(
ap
,
const
char
*
);
size_t
len
=
va_arg
(
ap
,
size_t
);
char
**
dtext
=
malloc
(
sizeof
(
char
*
)
*
(
len
+
1
));
if
(
dtext
==
NULL
)
break
;
/* Copy values */
if
(
IsConfigIntegerType
(
item
->
i_type
))
...
...
@@ -510,18 +506,19 @@ int vlc_config_set (module_config_t *restrict item, int id, ...)
const
char
*
const
*
text
=
va_arg
(
ap
,
const
char
*
const
*
);
if
(
text
!=
NULL
)
{
for
(
size_t
i
=
0
;
i
<
len
;
i
++
)
dtext
[
i
]
=
text
[
i
]
?
strdup
(
dgettext
(
domain
,
text
[
i
]))
:
NULL
;
dtext
[
len
]
=
NULL
;
char
**
dtext
=
malloc
(
sizeof
(
char
*
)
*
(
len
+
1
));
if
(
dtext
!=
NULL
)
{
for
(
size_t
i
=
0
;
i
<
len
;
i
++
)
dtext
[
i
]
=
text
[
i
]
?
strdup
(
dgettext
(
domain
,
text
[
i
]
)
)
:
NULL
;
dtext
[
len
]
=
NULL
;
}
item
->
ppsz_list_text
=
dtext
;
}
else
{
free
(
dtext
);
item
->
ppsz_list_text
=
NULL
;
}
item
->
i_list
=
len
;
item
->
pf_update_list
=
va_arg
(
ap
,
vlc_callback_t
);
...
...
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