[rygel-grilo] Check pointer before freeing



commit 4d664426a0394423a11c129f6c59bc40a910125a
Author: Juan A. Suarez Romero <jasuarez igalia com>
Date:   Fri May 21 11:23:22 2010 +0200

    Check pointer before freeing

 lib/media-server1-client.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/lib/media-server1-client.c b/lib/media-server1-client.c
index 0c13332..e82a0be 100644
--- a/lib/media-server1-client.c
+++ b/lib/media-server1-client.c
@@ -96,8 +96,10 @@ G_DEFINE_TYPE (MS1Client, ms1_client, G_TYPE_OBJECT);
 static void
 free_gvalue (GValue *v)
 {
-  g_value_unset (v);
-  g_free (v);
+  if (v) {
+    g_value_unset (v);
+    g_free (v);
+  }
 }
 
 /* Free AsyncData */



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]