summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier CrĂȘte <olivier.crete@collabora.com>2014-04-25 00:53:09 (GMT)
committerOlivier CrĂȘte <olivier.crete@collabora.com>2014-04-25 00:55:56 (GMT)
commit0cc1a1610e6e1024edcc37dd77008ed3e791d276 (patch)
treee46e165c5fda0bf2de00a109840f33882fadfda7
parentb572ecc505f5c1add4623871fe01143bca0ba3cb (diff)
downloadlibnice-0cc1a1610e6e1024edcc37dd77008ed3e791d276.tar.gz
libnice-0cc1a1610e6e1024edcc37dd77008ed3e791d276.tar.xz
conncheck: Only print debug message if actually freeing something
-rw-r--r--agent/conncheck.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/agent/conncheck.c b/agent/conncheck.c
index 241151f..970ecab 100644
--- a/agent/conncheck.c
+++ b/agent/conncheck.c
@@ -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;