summaryrefslogtreecommitdiff
path: root/src/analysis/db/items
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2016-12-15 13:40:28 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2016-12-15 13:40:28 (GMT)
commit124c8410dbfcad59d66b850c50c96ec73a607ab7 (patch)
treeb7127c66abfccd11b9126741e2809a893ee44143 /src/analysis/db/items
parentdb1a6171007a6641a4659392c9bcc05670396643 (diff)
Defined proper accesses to instructions loaded by a processor.
Diffstat (limited to 'src/analysis/db/items')
-rw-r--r--src/analysis/db/items/comment.c2
-rw-r--r--src/analysis/db/items/switcher.c6
2 files changed, 7 insertions, 1 deletions
diff --git a/src/analysis/db/items/comment.c b/src/analysis/db/items/comment.c
index 45331b8..55893d1 100644
--- a/src/analysis/db/items/comment.c
+++ b/src/analysis/db/items/comment.c
@@ -638,6 +638,8 @@ static bool g_db_comment_run(GDbComment *comment, GLoadedBinary *binary, bool ap
}
+ g_object_unref(G_OBJECT(instr));
+
g_object_unref(G_OBJECT(proc));
}
diff --git a/src/analysis/db/items/switcher.c b/src/analysis/db/items/switcher.c
index 15354e9..748c934 100644
--- a/src/analysis/db/items/switcher.c
+++ b/src/analysis/db/items/switcher.c
@@ -527,7 +527,7 @@ static bool g_db_switcher_run(GDbSwitcher *switcher, GLoadedBinary *binary, ImmO
}
result = G_IS_IMM_OPERAND(op);
- if (!result) goto exit_instr;
+ if (!result) goto exit_operand;
/* Traitement au niveau du rendu graphique */
@@ -559,6 +559,10 @@ static bool g_db_switcher_run(GDbSwitcher *switcher, GLoadedBinary *binary, ImmO
/* TODO g_object_unref(G_OBJECT(buffer));*/
+ exit_operand:
+
+ g_object_unref(G_OBJECT(proc));
+
exit_instr:
g_object_unref(G_OBJECT(proc));