Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
libdvbpsi
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
libdvbpsi
Commits
d8b5b442
Commit
d8b5b442
authored
Feb 07, 2011
by
Jean-Paul Saman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
examples/get_pcr_pid.c: fix leaking of memory
The cleanup paths forgot to cleanup the allocated libdvbpsi handles.
parent
d6bdd063
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
examples/get_pcr_pid.c
examples/get_pcr_pid.c
+6
-4
No files found.
examples/get_pcr_pid.c
View file @
d8b5b442
...
...
@@ -228,20 +228,22 @@ int main( int i_argc, char **pp_argv )
for
(
int
i
=
0
;
i
<
MAX_PROGRAMS
;
i
++
)
{
dvbpsi_DetachPMT
(
p_pmt_dvbpsi_fds
[
i
]);
dvbpsi_DeleteHandle
(
p_pmt_dvbpsi_fds
[
i
]);
if
(
p_pmt_dvbpsi_fds
[
i
])
{
dvbpsi_DetachPMT
(
p_pmt_dvbpsi_fds
[
i
]);
dvbpsi_DeleteHandle
(
p_pmt_dvbpsi_fds
[
i
]);
}
p_pmt_dvbpsi_fds
[
i
]
=
NULL
;
}
result
=
EXIT_SUCCESS
;
out:
if
(
p_dvbpsi
==
NULL
)
if
(
p_dvbpsi
)
{
dvbpsi_DetachPAT
(
p_dvbpsi
);
dvbpsi_DeleteHandle
(
p_dvbpsi
);
}
close
(
i_fd
);
fprintf
(
stderr
,
"no PAT/PMT found
\n
"
);
return
result
;
}
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