Commit 217d71c4 authored by Jean-Paul Saman's avatar Jean-Paul Saman

dvbinfo: Fix resource leak (CID: 17270)

The error path for dvbpsi_pmt_attach() in handle_PAT failed to release
allocated resources.
parent 8d6c1cb3
......@@ -748,6 +748,8 @@ static void handle_PAT(void* p_data, dvbpsi_pat_t* p_pat)
if (!dvbpsi_pmt_attach(p_pmt->handle, p_program->i_number, handle_PMT, p_stream))
{
fprintf(stderr, "dvbinfo: Failed to attach new pmt decoder\n");
dvbpsi_delete(p_pmt->handle);
free(p_pmt);
break;
}
......
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