Commit 804a4c09 authored by Olivier Crête's avatar Olivier Crête

component: Fix potential NULL deference

This was introduced recently and flagged by Coverity.
parent f36cf5b6
...@@ -197,7 +197,8 @@ nice_component_remove_socket (NiceAgent *agent, NiceComponent *cmp, ...@@ -197,7 +197,8 @@ nice_component_remove_socket (NiceAgent *agent, NiceComponent *cmp,
conn_check_prune_socket (agent, stream, cmp, candidate->sockptr); conn_check_prune_socket (agent, stream, cmp, candidate->sockptr);
nice_component_detach_socket (cmp, candidate->sockptr); nice_component_detach_socket (cmp, candidate->sockptr);
} }
agent_remove_local_candidate (agent, stream, (NiceCandidate *) candidate); if (stream)
agent_remove_local_candidate (agent, stream, (NiceCandidate *) candidate);
nice_candidate_free ((NiceCandidate *)candidate); nice_candidate_free ((NiceCandidate *)candidate);
cmp->local_candidates = g_slist_delete_link (cmp->local_candidates, i); cmp->local_candidates = g_slist_delete_link (cmp->local_candidates, i);
......
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