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
eccbdf8f
Commit
eccbdf8f
authored
Aug 16, 2011
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Destroy submodules from vlc_module_destroy()
Again, this should help fix leaks in error paths.
parent
cefb8d38
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
9 deletions
+9
-9
src/modules/entry.c
src/modules/entry.c
+8
-0
src/modules/modules.c
src/modules/modules.c
+1
-9
No files found.
src/modules/entry.c
View file @
eccbdf8f
...
...
@@ -73,6 +73,14 @@ module_t *vlc_module_create (void)
void
vlc_module_destroy
(
module_t
*
module
)
{
for
(
module_t
*
m
=
module
->
submodule
,
*
next
;
m
!=
NULL
;
m
=
next
)
{
next
=
m
->
next
;
vlc_module_destroy
(
m
);
}
free
(
module
->
domain
);
free
(
module
->
psz_filename
);
for
(
unsigned
i
=
0
;
i
<
module
->
i_shortcuts
;
i
++
)
free
(
module
->
pp_shortcuts
[
i
]);
free
(
module
->
pp_shortcuts
);
...
...
src/modules/modules.c
View file @
eccbdf8f
...
...
@@ -1050,6 +1050,7 @@ static module_t *module_InitStatic (vlc_plugin_cb entry)
static
void
DeleteModule
(
module_t
**
head
,
module_t
*
p_module
)
{
assert
(
p_module
);
assert
(
p_module
->
parent
==
NULL
);
/* Unlist the module (if it is in the list) */
module_t
**
pp_self
=
head
;
...
...
@@ -1062,17 +1063,8 @@ static void DeleteModule (module_t **head, module_t *p_module)
#ifdef HAVE_DYNAMIC_PLUGINS
if
(
p_module
->
b_loaded
&&
p_module
->
b_unloadable
)
module_Unload
(
p_module
->
handle
);
free
(
p_module
->
psz_filename
);
#endif
/* Free and detach the object's children */
while
(
p_module
->
submodule
)
{
module_t
*
submodule
=
p_module
->
submodule
;
p_module
->
submodule
=
submodule
->
next
;
vlc_module_destroy
(
submodule
);
}
config_Free
(
p_module
);
vlc_module_destroy
(
p_module
);
}
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