Commit 3b2dcf44 authored by Jean-Paul Saman's avatar Jean-Paul Saman

examples/get_pcr_pid.c: free p_buffer on exit.

(cherry picked from commit 870c2f7d76e3a9c34dd54c75947496181eb727bf)
parent b169eb0c
...@@ -172,6 +172,8 @@ int main( int i_argc, char **pp_argv ) ...@@ -172,6 +172,8 @@ int main( int i_argc, char **pp_argv )
p_pat_dvbpsi_fd = dvbpsi_AttachPAT( PATCallback, NULL ); p_pat_dvbpsi_fd = dvbpsi_AttachPAT( PATCallback, NULL );
p_buffer = malloc( TS_SIZE * READ_ONCE ); p_buffer = malloc( TS_SIZE * READ_ONCE );
if ( p_buffer == NULL )
goto out;
for ( ; ; ) for ( ; ; )
{ {
...@@ -195,7 +197,9 @@ int main( int i_argc, char **pp_argv ) ...@@ -195,7 +197,9 @@ int main( int i_argc, char **pp_argv )
i_ts_read++; i_ts_read++;
} }
} }
free( p_buffer );
out:
close( i_fd ); close( i_fd );
fprintf( stderr, "no PAT/PMT found\n" ); fprintf( stderr, "no PAT/PMT found\n" );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment