rtsp-stream: Always unref return value of gst_object_get_parent()
[platform/upstream/gstreamer.git] / examples / test-cgroups.c
index 0a38916..600fa3c 100644 (file)
@@ -79,6 +79,8 @@ static void default_thread_enter (GstRTSPThreadPool * pool,
 static void default_configure_thread (GstRTSPThreadPool * pool,
     GstRTSPThread * thread, GstRTSPContext * ctx);
 
+static GType gst_rtsp_cgroup_pool_get_type (void);
+
 G_DEFINE_TYPE (GstRTSPCGroupPool, gst_rtsp_cgroup_pool,
     GST_TYPE_RTSP_THREAD_POOL);
 
@@ -105,9 +107,11 @@ static void
 gst_rtsp_cgroup_pool_init (GstRTSPCGroupPool * pool)
 {
   pool->user = cgroup_new_cgroup ("user");
-  g_assert (cgroup_add_controller (pool->user, "cpu") != NULL);
+  if (cgroup_add_controller (pool->user, "cpu") == NULL)
+    g_error ("Failed to add cpu controller to user cgroup");
   pool->admin = cgroup_new_cgroup ("admin");
-  g_assert (cgroup_add_controller (pool->admin, "cpu") != NULL);
+  if (cgroup_add_controller (pool->admin, "cpu") == NULL)
+    g_error ("Failed to add cpu controller to admin cgroup");
 }
 
 static void