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
277e48de
Commit
277e48de
authored
Dec 16, 2007
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
config_Free simplifications
parent
64ea6839
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
27 deletions
+22
-27
include/vlc_configuration.h
include/vlc_configuration.h
+1
-1
src/config/core.c
src/config/core.c
+21
-26
No files found.
include/vlc_configuration.h
View file @
277e48de
...
@@ -135,7 +135,7 @@ struct config_category_t
...
@@ -135,7 +135,7 @@ struct config_category_t
typedef
union
typedef
union
{
{
c
onst
char
*
psz
;
c
har
*
psz
;
int
i
;
int
i
;
float
f
;
float
f
;
}
module_value_t
;
}
module_value_t
;
...
...
src/config/core.c
View file @
277e48de
...
@@ -487,7 +487,6 @@ module_config_t *config_FindConfig( vlc_object_t *p_this, const char *psz_name )
...
@@ -487,7 +487,6 @@ module_config_t *config_FindConfig( vlc_object_t *p_this, const char *psz_name )
int
config_Duplicate
(
module_t
*
p_module
,
const
module_config_t
*
p_orig
,
int
config_Duplicate
(
module_t
*
p_module
,
const
module_config_t
*
p_orig
,
size_t
n
)
size_t
n
)
{
{
int
j
;
const
module_config_t
*
p_item
,
*
p_end
=
p_orig
+
n
;
const
module_config_t
*
p_item
,
*
p_end
=
p_orig
+
n
;
/* Calculate the structure length */
/* Calculate the structure length */
...
@@ -560,48 +559,44 @@ void config_Free( module_t *p_module )
...
@@ -560,48 +559,44 @@ void config_Free( module_t *p_module )
{
{
module_config_t
*
p_item
=
p_module
->
p_config
+
j
;
module_config_t
*
p_item
=
p_module
->
p_config
+
j
;
free
(
(
char
*
)
p_item
->
psz_type
);
free
(
p_item
->
psz_type
);
free
(
(
char
*
)
p_item
->
psz_name
);
free
(
p_item
->
psz_name
);
free
(
(
char
*
)
p_item
->
psz_text
);
free
(
p_item
->
psz_text
);
free
(
(
char
*
)
p_item
->
psz_longtext
);
free
(
p_item
->
psz_longtext
);
if
(
IsConfigStringType
(
p_item
->
i_type
))
if
(
IsConfigStringType
(
p_item
->
i_type
))
{
{
free
(
(
char
*
)
p_item
->
value
.
psz
);
free
(
p_item
->
value
.
psz
);
free
(
(
char
*
)
p_item
->
orig
.
psz
);
free
(
p_item
->
orig
.
psz
);
free
(
(
char
*
)
p_item
->
saved
.
psz
);
free
(
p_item
->
saved
.
psz
);
}
}
if
(
p_item
->
i_list
)
if
(
p_item
->
i_list
)
{
{
for
(
i
=
0
;
i
<
p_item
->
i_list
;
i
++
)
if
(
p_item
->
ppsz_list
)
{
for
(
i
=
0
;
i
<
p_item
->
i_list
;
i
++
)
if
(
p_item
->
ppsz_list
&&
p_item
->
ppsz_list
[
i
]
)
free
(
p_item
->
ppsz_list
[
i
]
);
free
(
(
char
*
)
p_item
->
ppsz_list
[
i
]
);
if
(
p_item
->
ppsz_list_text
)
if
(
p_item
->
ppsz_list_text
&&
p_item
->
ppsz_list_text
[
i
]
)
for
(
i
=
0
;
i
<
p_item
->
i_list
;
i
++
)
free
(
(
char
*
)
p_item
->
ppsz_list_text
[
i
]
);
free
(
p_item
->
ppsz_list
[
i
]
);
}
free
(
p_item
->
ppsz_list
);
if
(
p_item
->
ppsz_list
)
free
(
p_item
->
ppsz_list
);
free
(
p_item
->
ppsz_list_text
);
if
(
p_item
->
ppsz_list_text
)
free
(
p_item
->
ppsz_list_text
);
free
(
p_item
->
pi_list
);
if
(
p_item
->
pi_list
)
free
(
p_item
->
pi_list
);
}
}
if
(
p_item
->
i_action
)
if
(
p_item
->
i_action
)
{
{
for
(
i
=
0
;
i
<
p_item
->
i_action
;
i
++
)
for
(
i
=
0
;
i
<
p_item
->
i_action
;
i
++
)
{
{
free
(
(
char
*
)
p_item
->
ppsz_action_text
[
i
]
);
free
(
p_item
->
ppsz_action_text
[
i
]
);
}
}
if
(
p_item
->
ppf_action
)
free
(
p_item
->
ppf_action
);
free
(
p_item
->
ppf_action
);
if
(
p_item
->
ppsz_action_text
)
free
(
p_item
->
ppsz_action_text
);
free
(
p_item
->
ppsz_action_text
);
}
}
}
}
if
(
p_module
->
p_config
!=
NULL
)
free
(
p_module
->
p_config
);
{
p_module
->
p_config
=
NULL
;
free
(
p_module
->
p_config
);
p_module
->
p_config
=
NULL
;
}
}
}
/*****************************************************************************
/*****************************************************************************
...
...
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