diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2018-06-05 18:31:45 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2018-06-05 18:31:45 (GMT) |
commit | 4b36edf684b49eb5584f8f0c5aff3dd7aac2c834 (patch) | |
tree | 527b2829dbb525a8819731bb2e146aafe575987e /plugins/arm/v7/registers/coproc.c | |
parent | 09d390300548fce2912f47114265c484b89c5012 (diff) |
Released the mutex even in case of register loading failure.
Diffstat (limited to 'plugins/arm/v7/registers/coproc.c')
-rw-r--r-- | plugins/arm/v7/registers/coproc.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/plugins/arm/v7/registers/coproc.c b/plugins/arm/v7/registers/coproc.c index f1dc3bc..f13a7aa 100644 --- a/plugins/arm/v7/registers/coproc.c +++ b/plugins/arm/v7/registers/coproc.c @@ -398,11 +398,12 @@ static GArchRegister *get_armv7_cp_register(uint8_t index) result = _armv7_cp_registers[index]; - G_UNLOCK(_av7_cp_reg_mutex); + bad_index: - g_object_ref(G_OBJECT(result)); + G_UNLOCK(_av7_cp_reg_mutex); - bad_index: + if (result != NULL) + g_object_ref(G_OBJECT(result)); return result; |