summaryrefslogtreecommitdiff
path: root/src/arch
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2020-09-21 22:23:47 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2020-09-21 22:23:47 (GMT)
commit76fb13178cf6be94b8e01675b37f7cb1b92f7709 (patch)
treea6e6bbc6dde169add608097ceb5658fcb904bd08 /src/arch
parentdfe76faf21e254c02c86a1b0b1f8ca8fc07fe027 (diff)
Defined lock mechanism for buffer caches.
Diffstat (limited to 'src/arch')
-rw-r--r--src/arch/operands/target.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/arch/operands/target.c b/src/arch/operands/target.c
index 78a2fc1..2c75f1c 100644
--- a/src/arch/operands/target.c
+++ b/src/arch/operands/target.c
@@ -406,6 +406,8 @@ static char *g_target_operand_build_tooltip(const GTargetOperand *operand, const
cache = g_loaded_binary_get_disassembly_cache(binary);
+ g_buffer_cache_rlock(cache);
+
cursor = g_binary_cursor_new();
g_binary_cursor_update(G_BINARY_CURSOR(cursor), get_mrange_addr(srange));
@@ -423,6 +425,8 @@ static char *g_target_operand_build_tooltip(const GTargetOperand *operand, const
g_object_unref(G_OBJECT(line));
}
+ g_buffer_cache_runlock(cache);
+
g_object_unref(G_OBJECT(cache));
break;