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
c2b1d5b2
Commit
c2b1d5b2
authored
Aug 08, 2011
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Warn about dangling variable callbacks
parent
502b865b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
0 deletions
+22
-0
src/misc/variables.c
src/misc/variables.c
+22
-0
No files found.
src/misc/variables.c
View file @
c2b1d5b2
...
@@ -42,6 +42,9 @@
...
@@ -42,6 +42,9 @@
#include <assert.h>
#include <assert.h>
#include <math.h>
#include <math.h>
#include <limits.h>
#include <limits.h>
#ifdef __GLIBC__
# include <dlfcn.h>
#endif
/*****************************************************************************
/*****************************************************************************
* Private types
* Private types
...
@@ -167,6 +170,25 @@ static void Destroy( variable_t *p_var )
...
@@ -167,6 +170,25 @@ static void Destroy( variable_t *p_var )
free
(
p_var
->
choices
.
p_values
);
free
(
p_var
->
choices
.
p_values
);
free
(
p_var
->
choices_text
.
p_values
);
free
(
p_var
->
choices_text
.
p_values
);
}
}
#ifndef NDEBUG
for
(
int
i
=
0
;
i
<
p_var
->
i_entries
;
i
++
)
{
const
char
*
file
=
"?"
,
*
symbol
=
"?"
;
const
void
*
addr
=
p_var
->
p_entries
[
i
].
pf_callback
;
# ifdef __GLIBC__
Dl_info
info
;
if
(
dladdr
(
addr
,
&
info
))
{
if
(
info
.
dli_fname
)
file
=
info
.
dli_fname
;
if
(
info
.
dli_sname
)
symbol
=
info
.
dli_sname
;
}
# endif
fprintf
(
stderr
,
"Error: callback on
\"
%s
\"
dangling %s(%s)[%p]
\n
"
,
p_var
->
psz_name
,
file
,
symbol
,
addr
);
}
#endif
free
(
p_var
->
psz_name
);
free
(
p_var
->
psz_name
);
free
(
p_var
->
psz_text
);
free
(
p_var
->
psz_text
);
free
(
p_var
->
p_entries
);
free
(
p_var
->
p_entries
);
...
...
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