Commit 0cc1a161 authored by Olivier Crête's avatar Olivier Crête

conncheck: Only print debug message if actually freeing something

parent b572ecc5
......@@ -1435,9 +1435,12 @@ void conn_check_free (NiceAgent *agent)
for (i = agent->streams; i; i = i->next) {
Stream *stream = i->data;
nice_debug ("Agent %p, freeing conncheck_list of stream %p", agent, stream);
g_slist_free_full (stream->conncheck_list, conn_check_free_item);
stream->conncheck_list = NULL;
if (stream->conncheck_list) {
nice_debug ("Agent %p, freeing conncheck_list of stream %p", agent,
stream);
g_slist_free_full (stream->conncheck_list, conn_check_free_item);
stream->conncheck_list = NULL;
}
}
conn_check_stop (agent);
......@@ -1454,8 +1457,12 @@ void conn_check_prune_stream (NiceAgent *agent, Stream *stream)
GSList *i;
gboolean keep_going = FALSE;
g_slist_free_full (stream->conncheck_list, conn_check_free_item);
stream->conncheck_list = NULL;
if (stream->conncheck_list) {
nice_debug ("Agent %p, freeing conncheck_list of stream %p", agent, stream);
g_slist_free_full (stream->conncheck_list, conn_check_free_item);
stream->conncheck_list = NULL;
}
for (i = agent->streams; i; i = i->next) {
Stream *s = i->data;
......
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