diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2016-11-03 14:01:38 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2016-11-03 14:01:38 (GMT) |
commit | e5d58e1f70405012fd8fbe8d61937f92fa3583a9 (patch) | |
tree | 29b555020a18df0e91ffd10460693bbe40bed729 /src/gui | |
parent | 25576d8dd565547fe1178f7faa583a36718f98f8 (diff) |
Counted references for each provided binary format.
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/dialogs/gotox.c | 4 | ||||
-rw-r--r-- | src/gui/dialogs/shellcode.c | 2 | ||||
-rw-r--r-- | src/gui/panels/bookmarks.c | 9 | ||||
-rw-r--r-- | src/gui/panels/strings.c | 3 | ||||
-rw-r--r-- | src/gui/panels/symbols.c | 4 | ||||
-rw-r--r-- | src/gui/tb/source.c | 3 |
6 files changed, 15 insertions, 10 deletions
diff --git a/src/gui/dialogs/gotox.c b/src/gui/dialogs/gotox.c index 340da5c..02f1a02 100644 --- a/src/gui/dialogs/gotox.c +++ b/src/gui/dialogs/gotox.c @@ -245,6 +245,8 @@ GtkWidget *create_gotox_dialog_for_entry_points(GtkWindow *parent, GLoadedBinary } + g_object_unref(G_OBJECT(format)); + g_object_unref(G_OBJECT(store)); gtk_dialog_set_response_sensitive(GTK_DIALOG(result), GTK_RESPONSE_OK, has_entry_points); @@ -402,6 +404,8 @@ static void add_new_location_to_list(GtkTreeStore *store, GLoadedBinary *binary, } + g_object_unref(G_OBJECT(format)); + } /* Image de représentation */ diff --git a/src/gui/dialogs/shellcode.c b/src/gui/dialogs/shellcode.c index faf3bdf..5c1a33c 100644 --- a/src/gui/dialogs/shellcode.c +++ b/src/gui/dialogs/shellcode.c @@ -222,6 +222,8 @@ static void export_assistant_close(GtkAssistant *assistant, GObject *ref) */ gtk_widget_destroy(GTK_WIDGET(assistant)); + g_object_unref(G_OBJECT(format)); + } diff --git a/src/gui/panels/bookmarks.c b/src/gui/panels/bookmarks.c index eaa2168..893c1bd 100644 --- a/src/gui/panels/bookmarks.c +++ b/src/gui/panels/bookmarks.c @@ -573,7 +573,6 @@ static void on_collection_content_changed(GDbCollection *collec, DBAction action GtkTreeStore *store; /* Modèle de gestion */ - GExeFormat *format; /* Format du fichier binaire */ GArchProcessor *proc; /* Architecture du binaire */ MemoryDataSize msize; /* Taille par défaut */ @@ -590,18 +589,10 @@ static void on_collection_content_changed(GDbCollection *collec, DBAction action { store = GTK_TREE_STORE(gtk_tree_view_get_model(panel->treeview)); - format = g_loaded_binary_get_format(panel->binary); - - proc = g_loaded_binary_get_processor(panel->binary); msize = g_arch_processor_get_memory_size(proc); g_object_unref(G_OBJECT(proc)); - - - - - addr = g_db_bookmark_get_address(bookmark); vmpa2_phys_to_string(addr, msize, phys, NULL); diff --git a/src/gui/panels/strings.c b/src/gui/panels/strings.c index 5d25b09..a651fff 100644 --- a/src/gui/panels/strings.c +++ b/src/gui/panels/strings.c @@ -560,8 +560,9 @@ static void change_strings_panel_current_binary(GStringsPanel *panel, GLoadedBin } - g_object_unref(G_OBJECT(layer)); g_object_unref(G_OBJECT(content)); + g_object_unref(G_OBJECT(layer)); + g_object_unref(G_OBJECT(format)); } diff --git a/src/gui/panels/symbols.c b/src/gui/panels/symbols.c index ac2a703..4fffe35 100644 --- a/src/gui/panels/symbols.c +++ b/src/gui/panels/symbols.c @@ -706,6 +706,8 @@ static void reload_symbols_for_new_list_view(GSymbolsPanel *panel) } + g_object_unref(G_OBJECT(format)); + } @@ -918,6 +920,8 @@ static void reload_symbols_for_new_tree_view(GSymbolsPanel *panel) } + g_object_unref(G_OBJECT(format)); + } diff --git a/src/gui/tb/source.c b/src/gui/tb/source.c index 0685368..02ed643 100644 --- a/src/gui/tb/source.c +++ b/src/gui/tb/source.c @@ -260,6 +260,9 @@ static void update_source_item_binary(GEditorItem *item, GLoadedBinary *binary) g_signal_handlers_unblock_by_func(combo, G_CALLBACK(change_selected_source), item); //gtk_combo_box_set_active(combo, defsrc); + + g_object_unref(G_OBJECT(format)); + #endif } |