[sysprof] turbostat: fix ref count check



commit e647a83557ec87b4dc513ede1f208529780d491f
Author: Christian Hergert <chergert redhat com>
Date:   Fri Aug 21 13:07:44 2020 -0700

    turbostat: fix ref count check

 src/sysprofd/sysprof-turbostat.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/sysprofd/sysprof-turbostat.c b/src/sysprofd/sysprof-turbostat.c
index 72d6d674..4ef3f20e 100644
--- a/src/sysprofd/sysprof-turbostat.c
+++ b/src/sysprofd/sysprof-turbostat.c
@@ -87,7 +87,7 @@ void
 sysprof_turbostat_unref (SysprofTurbostat *self)
 {
   g_return_if_fail (self != NULL);
-  g_return_if_fail (self->ref_count > 1);
+  g_return_if_fail (self->ref_count > 0);
 
   if (g_atomic_int_dec_and_test (&self->ref_count))
     sysprof_turbostat_finalize (self);


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