diff options
author | Denis Kenzior <denkenz@gmail.com> | 2024-02-28 21:16:03 -0600 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2024-02-28 21:16:03 -0600 |
commit | 5244e1e40a57c2283b0014b191e7ee86c1eda31d (patch) | |
tree | dd6a6d48150610bfe5894a616cd3252aa94e70fe | |
parent | db52bc052b0d5ff4eacb2a934a91009dfa3c40c1 (diff) | |
download | ofono-5244e1e40a57c2283b0014b191e7ee86c1eda31d.tar.gz |
voicecall: Handle possible NULL dereference
There may be circumstances when 'n' or 'o' are NULL. Make sure the next
member is not dereferenced in this case.
-rw-r--r-- | src/voicecall.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/voicecall.c b/src/voicecall.c index 4ce161b54..725a166b0 100644 --- a/src/voicecall.c +++ b/src/voicecall.c @@ -1175,8 +1175,11 @@ static void voicecalls_multiparty_changed(GSList *old, GSList *new) voicecall_emit_multiparty(nc, TRUE); n = n->next; } else { - n = n->next; - o = o->next; + if (n) + n = n->next; + + if (o) + o = o->next; } } } |