Commit c482d192 authored by Jean-Paul Saman's avatar Jean-Paul Saman

examples/get_pcr_pid.c: free p_buffer on exit.

parent 5e384da0
......@@ -172,6 +172,8 @@ int main( int i_argc, char **pp_argv )
p_pat_dvbpsi_fd = dvbpsi_AttachPAT( PATCallback, NULL );
p_buffer = malloc( TS_SIZE * READ_ONCE );
if ( p_buffer == NULL )
goto out;
for ( ; ; )
{
......@@ -195,7 +197,9 @@ int main( int i_argc, char **pp_argv )
i_ts_read++;
}
}
free( p_buffer );
out:
close( i_fd );
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