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
d4b0d0c8
Commit
d4b0d0c8
authored
Aug 16, 2011
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clean up config_Free()
parent
03cf0f14
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
20 deletions
+15
-20
src/config/configuration.h
src/config/configuration.h
+1
-1
src/config/core.c
src/config/core.c
+12
-17
src/modules/entry.c
src/modules/entry.c
+2
-0
src/modules/modules.c
src/modules/modules.c
+0
-2
No files found.
src/config/configuration.h
View file @
d4b0d0c8
...
...
@@ -30,7 +30,7 @@ extern "C" {
int
config_CreateDir
(
vlc_object_t
*
,
const
char
*
);
int
config_AutoSaveConfigFile
(
vlc_object_t
*
);
void
config_Free
(
module_t
*
);
void
config_Free
(
module_config_t
*
,
size_t
);
int
config_LoadCmdLine
(
vlc_object_t
*
,
int
,
const
char
*
[],
int
*
);
int
config_LoadConfigFile
(
vlc_object_t
*
);
...
...
src/config/core.c
View file @
d4b0d0c8
...
...
@@ -420,18 +420,16 @@ module_config_t *config_FindConfig (vlc_object_t *p_this, const char *name)
return
p
?
*
p
:
NULL
;
}
/**
***************************************************************************
*
config_Free: frees a duplicated module's configuration data
.
*
****************************************************************************
*
This function frees all the data duplicated by config_Duplicate.
*
****************************************************************************
/
void
config_Free
(
module_t
*
p_module
)
/**
*
Destroys an array of configuration items
.
*
\param config start of array of items
*
\param confsize number of items in the array
*/
void
config_Free
(
module_config_t
*
config
,
size_t
confsize
)
{
int
i
;
for
(
size_t
j
=
0
;
j
<
p_module
->
confsize
;
j
++
)
for
(
size_t
j
=
0
;
j
<
confsize
;
j
++
)
{
module_config_t
*
p_item
=
p_module
->
p_
config
+
j
;
module_config_t
*
p_item
=
config
+
j
;
free
(
p_item
->
psz_type
);
free
(
p_item
->
psz_name
);
...
...
@@ -446,10 +444,10 @@ void config_Free( module_t *p_module )
}
if
(
p_item
->
ppsz_list
)
for
(
i
=
0
;
i
<
p_item
->
i_list
;
i
++
)
for
(
int
i
=
0
;
i
<
p_item
->
i_list
;
i
++
)
free
(
p_item
->
ppsz_list
[
i
]
);
if
(
p_item
->
ppsz_list_text
)
for
(
i
=
0
;
i
<
p_item
->
i_list
;
i
++
)
for
(
int
i
=
0
;
i
<
p_item
->
i_list
;
i
++
)
free
(
p_item
->
ppsz_list_text
[
i
]
);
free
(
p_item
->
ppsz_list
);
free
(
p_item
->
ppsz_list_text
);
...
...
@@ -457,17 +455,14 @@ void config_Free( module_t *p_module )
if
(
p_item
->
i_action
)
{
for
(
i
=
0
;
i
<
p_item
->
i_action
;
i
++
)
{
for
(
int
i
=
0
;
i
<
p_item
->
i_action
;
i
++
)
free
(
p_item
->
ppsz_action_text
[
i
]
);
}
free
(
p_item
->
ppf_action
);
free
(
p_item
->
ppsz_action_text
);
}
}
free
(
p_module
->
p_config
);
p_module
->
p_config
=
NULL
;
free
(
config
);
}
#undef config_ResetAll
...
...
src/modules/entry.c
View file @
d4b0d0c8
...
...
@@ -91,6 +91,8 @@ void vlc_module_destroy (module_t *module)
vlc_module_destroy
(
m
);
}
config_Free
(
module
->
p_config
,
module
->
confsize
);
free
(
module
->
domain
);
free
(
module
->
psz_filename
);
for
(
unsigned
i
=
0
;
i
<
module
->
i_shortcuts
;
i
++
)
...
...
src/modules/modules.c
View file @
d4b0d0c8
...
...
@@ -1053,7 +1053,5 @@ static void DeleteModule (module_t **head, module_t *p_module)
if
(
p_module
->
b_loaded
&&
p_module
->
b_unloadable
)
module_Unload
(
p_module
->
handle
);
#endif
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