mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2026-02-12 16:10:54 +00:00
turbostat: fix ref count check
This commit is contained in:
@ -87,7 +87,7 @@ void
|
|||||||
sysprof_turbostat_unref (SysprofTurbostat *self)
|
sysprof_turbostat_unref (SysprofTurbostat *self)
|
||||||
{
|
{
|
||||||
g_return_if_fail (self != NULL);
|
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))
|
if (g_atomic_int_dec_and_test (&self->ref_count))
|
||||||
sysprof_turbostat_finalize (self);
|
sysprof_turbostat_finalize (self);
|
||||||
|
|||||||
Reference in New Issue
Block a user