summaryrefslogtreecommitdiff
path: root/src/analysis/db/items/comment.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/analysis/db/items/comment.c')
-rw-r--r--src/analysis/db/items/comment.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/analysis/db/items/comment.c b/src/analysis/db/items/comment.c
index 136b62b..bdff3a6 100644
--- a/src/analysis/db/items/comment.c
+++ b/src/analysis/db/items/comment.c
@@ -731,11 +731,12 @@ static bool g_db_comment_run(GDbComment *comment, GLoadedBinary *binary, bool ap
const mrange_t *range; /* Emplacement d'instruction */
size_t linked; /* Indice lié à traiter */
- result = true;
+ result = false;
cache = g_loaded_binary_get_disassembly_cache(binary);
+ if (cache == NULL) goto exit;
- g_buffer_cache_lock(cache);
+ g_buffer_cache_wlock(cache)
switch (comment->type)
{
@@ -813,10 +814,14 @@ static bool g_db_comment_run(GDbComment *comment, GLoadedBinary *binary, bool ap
}
- g_buffer_cache_unlock(cache);
+ g_buffer_cache_wunlock(cache);
g_object_unref(G_OBJECT(cache));
+ result = true;
+
+ exit:
+
return result;
}