[Pkg-telepathy-commits] [libnice] 235/265: conncheck: Only print debug message if actually freeing something

Simon McVittie smcv at debian.org
Wed May 14 12:05:12 UTC 2014


This is an automated email from the git hooks/post-receive script.

smcv pushed a commit to branch debian
in repository libnice.

commit 0cc1a1610e6e1024edcc37dd77008ed3e791d276
Author: Olivier Crête <olivier.crete at collabora.com>
Date:   Thu Apr 24 20:53:09 2014 -0400

    conncheck: Only print debug message if actually freeing something
---
 agent/conncheck.c | 17 ++++++++++++-----
 1 file 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;

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-telepathy/libnice.git



More information about the Pkg-telepathy-commits mailing list