summaryrefslogtreecommitdiff
path: root/src/gui/panels/strings.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/panels/strings.c')
-rw-r--r--src/gui/panels/strings.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/gui/panels/strings.c b/src/gui/panels/strings.c
index 4f919b1..b8631b6 100644
--- a/src/gui/panels/strings.c
+++ b/src/gui/panels/strings.c
@@ -1030,7 +1030,6 @@ static void mcb_strings_panel_find_refs(GtkMenuItem *menuitem, GStringsPanel *pa
const mrange_t *range; /* Couverture en mémoire */
GLoadedBinary *binary; /* Représentation binaire */
GArchProcessor *proc; /* Processeur de l'architecture*/
- GArchInstruction *list; /* Ensemble des instructions */
GArchInstruction *instr; /* Point de croisements */
GObject *ref; /* Espace de référencements */
GtkWidget *dialog; /* Boîte de dialogue à montrer */
@@ -1044,13 +1043,12 @@ static void mcb_strings_panel_find_refs(GtkMenuItem *menuitem, GStringsPanel *pa
binary = g_editor_item_get_current_binary(G_EDITOR_ITEM(panel));
proc = g_loaded_binary_get_processor(binary);
- list = g_arch_processor_get_disassembled_instructions(proc);
/**
* Se rapporter aux commentaires de mcb_edition_list_xrefs() pour les questions
* concernant l'usage d'une adresse d'instruction au lieu de son emplacement.
*/
- instr = g_arch_instruction_find_by_address(list, get_mrange_addr(range), true);
+ instr = g_arch_processor_find_instr_by_address(proc, get_mrange_addr(range));
ref = g_editor_item_get_global_ref(G_EDITOR_ITEM(panel));
@@ -1069,6 +1067,9 @@ static void mcb_strings_panel_find_refs(GtkMenuItem *menuitem, GStringsPanel *pa
gtk_widget_destroy(dialog);
+ if (instr != NULL)
+ g_object_unref(G_OBJECT(instr));
+
g_object_unref(G_OBJECT(proc));
g_object_unref(G_OBJECT(symbol));