summaryrefslogtreecommitdiff
path: root/plugins/pychrysalide
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/pychrysalide')
-rw-r--r--plugins/pychrysalide/arch/instruction.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/plugins/pychrysalide/arch/instruction.c b/plugins/pychrysalide/arch/instruction.c
index e9a2e04..8c3d78d 100644
--- a/plugins/pychrysalide/arch/instruction.c
+++ b/plugins/pychrysalide/arch/instruction.c
@@ -110,7 +110,7 @@ static PyObject *py_arch_instruction_get_sources(PyObject *self, void *unused)
{
PyObject *result; /* Instance à retourner */
GArchInstruction *instr; /* Version native */
- instr_link_t *source; /* Origine des liens */
+ const instr_link_t *source; /* Origine des liens */
size_t count; /* Nombre de liens présents */
size_t i; /* Boucle de parcours */
PyObject *linked; /* Source de lien Python */
@@ -135,6 +135,8 @@ static PyObject *py_arch_instruction_get_sources(PyObject *self, void *unused)
ret = PyTuple_SetItem(result, i, Py_BuildValue("(OO)", linked, type));
assert(ret == 0);
+ unref_instr_link(source);
+
}
g_arch_instruction_unlock_src(instr);
@@ -161,7 +163,7 @@ static PyObject *py_arch_instruction_get_destinations(PyObject *self, void *unus
{
PyObject *result; /* Instance à retourner */
GArchInstruction *instr; /* Version native */
- instr_link_t *dest; /* Destination des liens */
+ const instr_link_t *dest; /* Destination des liens */
size_t count; /* Nombre de liens présents */
size_t i; /* Boucle de parcours */
PyObject *linked; /* Destination de lien Python */
@@ -186,6 +188,8 @@ static PyObject *py_arch_instruction_get_destinations(PyObject *self, void *unus
ret = PyTuple_SetItem(result, i, Py_BuildValue("(OO)", linked, type));
assert(ret == 0);
+ unref_instr_link(dest);
+
}
g_arch_instruction_unlock_dest(instr);