summaryrefslogtreecommitdiff
path: root/ui/gtk/graph_analysis.c
diff options
context:
space:
mode:
authorPascal Quantin <pascal.quantin@gmail.com>2015-10-25 22:52:30 +0100
committerGerald Combs <gerald@wireshark.org>2015-10-26 23:57:51 +0000
commit1ea43c26e68d92838a7d91dce4fe9686b09f12c7 (patch)
tree65c8b3f84f589530b16fc6159974f1813aa8968d /ui/gtk/graph_analysis.c
parentd141562efb18f777c122405941bd5ef8c21513b1 (diff)
downloadwireshark-1ea43c26e68d92838a7d91dce4fe9686b09f12c7.tar.gz
Only store frame number and not a pointer to frame_data structure in seq_analysis_item_t
Qt GUI allows to keep windows open after closing the capture file. Let's not access to freed memory. Bug: 11573 Change-Id: I9e70d818a4b228af319961ec512b6b9725792477 Reviewed-on: https://code.wireshark.org/review/11270 Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Gerald Combs <gerald@wireshark.org>
Diffstat (limited to 'ui/gtk/graph_analysis.c')
-rw-r--r--ui/gtk/graph_analysis.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/ui/gtk/graph_analysis.c b/ui/gtk/graph_analysis.c
index da81d78b01..5aa85eaa55 100644
--- a/ui/gtk/graph_analysis.c
+++ b/ui/gtk/graph_analysis.c
@@ -442,7 +442,7 @@ static void dialog_graph_draw(graph_analysis_data_t *user_data)
if (gai->display) {
if (current_item>=display_items) break; /* the item is outside the display */
if (i>=first_item) {
- user_data->dlg.items[current_item].fd = gai->fd;
+ user_data->dlg.items[current_item].frame_number = gai->frame_number;
user_data->dlg.items[current_item].port_src = gai->port_src;
user_data->dlg.items[current_item].port_dst = gai->port_dst;
user_data->dlg.items[current_item].frame_label = gai->frame_label;
@@ -1000,7 +1000,7 @@ static gboolean button_press_event(GtkWidget *widget _U_, GdkEventButton *event,
user_data->dlg.needs_redraw = TRUE;
dialog_graph_draw(user_data);
- cf_goto_frame(&cfile, user_data->dlg.items[item].fd->num);
+ cf_goto_frame(&cfile, user_data->dlg.items[item].frame_number);
return TRUE;
}
@@ -1035,7 +1035,7 @@ static gboolean key_press_event(GtkWidget *widget _U_, GdkEventKey *event, gpoin
user_data->dlg.needs_redraw = TRUE;
dialog_graph_draw(user_data);
- cf_goto_frame(&cfile, user_data->dlg.items[user_data->dlg.selected_item-user_data->dlg.first_item].fd->num);
+ cf_goto_frame(&cfile, user_data->dlg.items[user_data->dlg.selected_item-user_data->dlg.first_item].frame_number);
return TRUE;
}