aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDenis Kenzior <denkenz@gmail.com>2024-02-28 21:16:03 -0600
committerDenis Kenzior <denkenz@gmail.com>2024-02-28 21:16:03 -0600
commit5244e1e40a57c2283b0014b191e7ee86c1eda31d (patch)
treedd6a6d48150610bfe5894a616cd3252aa94e70fe
parentdb52bc052b0d5ff4eacb2a934a91009dfa3c40c1 (diff)
downloadofono-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.c7
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;
}
}
}