Commit 4b8f19f7 authored by Jean-Paul Saman's avatar Jean-Paul Saman

src/dvbpsi.c: Dereference before null check (CID: 17272)

The assert() dereferenced the p_dvbpsi pointer before it was checked for null-value.
parent d74e30d9
......@@ -65,9 +65,10 @@ dvbpsi_t *dvbpsi_new(dvbpsi_message_cb callback, enum dvbpsi_msg_level level)
*****************************************************************************/
void dvbpsi_delete(dvbpsi_t *p_dvbpsi)
{
assert(p_dvbpsi->p_decoder == NULL);
if (p_dvbpsi)
if (p_dvbpsi) {
assert(p_dvbpsi->p_decoder == NULL);
p_dvbpsi->pf_message = NULL;
}
free(p_dvbpsi);
}
......
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