diff options
author | Olivier CrĂȘte <olivier.crete@collabora.com> | 2021-11-26 10:43:24 -0600 |
---|---|---|
committer | Olivier CrĂȘte <olivier.crete@collabora.com> | 2021-11-26 10:43:24 -0600 |
commit | f3f6bfafbe5634fac1b187634517c5b592d99788 (patch) | |
tree | cfb778b00213ce6202ac96fde8ad3b0bcf1205f3 | |
parent | 33206c29115865cb2326cfc1260ae02fdfd288fc (diff) | |
download | libnice-f3f6bfafbe5634fac1b187634517c5b592d99788.tar.gz |
agent: Clear the original message pointer instead of a copy
In one case, the message pointer gets replaced by the rfc4571_message
one, so it wasn't getting cleared as expected.
-rw-r--r-- | agent/agent.c | 4 | ||||
-rw-r--r-- | tests/test-send-recv.c | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/agent/agent.c b/agent/agent.c index a309f44..c552115 100644 --- a/agent/agent.c +++ b/agent/agent.c @@ -4557,8 +4557,8 @@ done: } /* Clear local modifications. */ - if (message->from == &from) { - message->from = NULL; + if (provided_message->from == &from) { + provided_message->from = NULL; } return retval; diff --git a/tests/test-send-recv.c b/tests/test-send-recv.c index dfc639f..2a86426 100644 --- a/tests/test-send-recv.c +++ b/tests/test-send-recv.c @@ -689,7 +689,7 @@ read_thread_agent_cb (GInputStream *input_stream, TestIOStreamThreadData *data) while (test_data->received_bytes < test_data->n_bytes) { GError *error = NULL; - NiceInputMessage *messages; + NiceInputMessage *messages = {0}; guint n_messages; gint n_valid_messages; |