summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2018-08-11 12:23:28 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2018-08-11 12:23:28 (GMT)
commit7af6b79557f0aa57200fbd798d3eca604615ee41 (patch)
treecade5cac194f894894923ce72fb54c43b9783bae /plugins
parent079e997ce5106dce42b08527a406850f950d291f (diff)
Added a basic check before releasing cached registers.
Diffstat (limited to 'plugins')
-rw-r--r--plugins/arm/v7/registers/banked.c2
-rw-r--r--plugins/arm/v7/registers/basic.c2
-rw-r--r--plugins/arm/v7/registers/coproc.c2
-rw-r--r--plugins/arm/v7/registers/simd.c2
-rw-r--r--plugins/arm/v7/registers/special.c2
-rw-r--r--plugins/dalvik/register.c2
6 files changed, 6 insertions, 6 deletions
diff --git a/plugins/arm/v7/registers/banked.c b/plugins/arm/v7/registers/banked.c
index c141d74..17eeb28 100644
--- a/plugins/arm/v7/registers/banked.c
+++ b/plugins/arm/v7/registers/banked.c
@@ -713,7 +713,7 @@ void clean_armv7_banked_register_cache(void)
G_LOCK(_av7_banked_reg_mutex);
for (i = 0; i < _av7_banked_reg_count; i++)
- g_object_unref(G_OBJECT(_armv7_banked_registers[i]));
+ g_clear_object(&_armv7_banked_registers[i]);
if (_armv7_banked_registers != NULL)
free(_armv7_banked_registers);
diff --git a/plugins/arm/v7/registers/basic.c b/plugins/arm/v7/registers/basic.c
index 526e864..0a4a768 100644
--- a/plugins/arm/v7/registers/basic.c
+++ b/plugins/arm/v7/registers/basic.c
@@ -448,7 +448,7 @@ void clean_armv7_basic_register_cache(void)
G_LOCK(_av7_basic_reg_mutex);
for (i = 0; i < _av7_basic_reg_count; i++)
- g_object_unref(G_OBJECT(_armv7_basic_registers[i]));
+ g_clear_object(&_armv7_basic_registers[i]);
if (_armv7_basic_registers != NULL)
free(_armv7_basic_registers);
diff --git a/plugins/arm/v7/registers/coproc.c b/plugins/arm/v7/registers/coproc.c
index 8200343..f30edec 100644
--- a/plugins/arm/v7/registers/coproc.c
+++ b/plugins/arm/v7/registers/coproc.c
@@ -428,7 +428,7 @@ void clean_armv7_cp_register_cache(void)
G_LOCK(_av7_cp_reg_mutex);
for (i = 0; i < _av7_cp_reg_count; i++)
- g_object_unref(G_OBJECT(_armv7_cp_registers[i]));
+ g_clear_object(&_armv7_cp_registers[i]);
if (_armv7_cp_registers != NULL)
free(_armv7_cp_registers);
diff --git a/plugins/arm/v7/registers/simd.c b/plugins/arm/v7/registers/simd.c
index ad84ede..ff9a242 100644
--- a/plugins/arm/v7/registers/simd.c
+++ b/plugins/arm/v7/registers/simd.c
@@ -519,7 +519,7 @@ void clean_armv7_simd_register_cache(void)
for (i = 0; i < SRM_COUNT; i++)
{
for (k = 0; k < _av7_simd_reg_count[i]; k++)
- g_object_unref(G_OBJECT(_armv7_simd_registers[i][k]));
+ g_clear_object(&_armv7_simd_registers[i][k]);
if (_armv7_simd_registers[i] != NULL)
free(_armv7_simd_registers[i]);
diff --git a/plugins/arm/v7/registers/special.c b/plugins/arm/v7/registers/special.c
index 156b9bf..e0579b4 100644
--- a/plugins/arm/v7/registers/special.c
+++ b/plugins/arm/v7/registers/special.c
@@ -472,7 +472,7 @@ void clean_armv7_special_register_cache(void)
G_LOCK(_av7_special_reg_mutex);
for (i = 0; i < _av7_special_reg_count; i++)
- g_object_unref(G_OBJECT(_armv7_special_registers[i]));
+ g_clear_object(&_armv7_special_registers[i]);
if (_armv7_special_registers != NULL)
free(_armv7_special_registers);
diff --git a/plugins/dalvik/register.c b/plugins/dalvik/register.c
index 0120495..c6bd2c7 100644
--- a/plugins/dalvik/register.c
+++ b/plugins/dalvik/register.c
@@ -501,7 +501,7 @@ void clean_dalvik_register_cache(void)
G_LOCK(_dreg_mutex);
for (i = 0; i < _dreg_count; i++)
- g_object_unref(G_OBJECT(_dalvik_registers[i]));
+ g_clear_object(&_dalvik_registers[i]);
if (_dalvik_registers != NULL)
free(_dalvik_registers);