aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
Diffstat (limited to 'ui')
-rw-r--r--ui/gtk/packet_panes.c5
-rw-r--r--ui/qt/packet_list.cpp5
2 files changed, 8 insertions, 2 deletions
diff --git a/ui/gtk/packet_panes.c b/ui/gtk/packet_panes.c
index 091f3b9a84..f3fab80f45 100644
--- a/ui/gtk/packet_panes.c
+++ b/ui/gtk/packet_panes.c
@@ -531,6 +531,7 @@ add_byte_views(epan_dissect_t *edt, GtkWidget *tree_view,
{
GSList *src_le;
struct data_source *src;
+ char* src_name;
/*
* Get rid of all the old notebook tabs.
@@ -544,8 +545,10 @@ add_byte_views(epan_dissect_t *edt, GtkWidget *tree_view,
*/
for (src_le = edt->pi.data_src; src_le != NULL; src_le = src_le->next) {
src = (struct data_source *)src_le->data;
- add_byte_tab(byte_nb_ptr, get_data_source_name(src), get_data_source_tvb(src), edt->tree,
+ src_name = get_data_source_name(src);
+ add_byte_tab(byte_nb_ptr, src_name, get_data_source_tvb(src), edt->tree,
tree_view);
+ wmem_free(NULL, src_name);
}
/*
diff --git a/ui/qt/packet_list.cpp b/ui/qt/packet_list.cpp
index ed04d3771f..43aab835a8 100644
--- a/ui/qt/packet_list.cpp
+++ b/ui/qt/packet_list.cpp
@@ -489,12 +489,15 @@ void PacketList::selectionChanged (const QItemSelection & selected, const QItemS
if (byte_view_tab_) {
GSList *src_le;
struct data_source *source;
+ char* source_name;
byte_view_tab_->clear();
for (src_le = cap_file_->edt->pi.data_src; src_le != NULL; src_le = src_le->next) {
source = (struct data_source *)src_le->data;
- byte_view_tab_->addTab(get_data_source_name(source), get_data_source_tvb(source), cap_file_->edt->tree, proto_tree_, (packet_char_enc)cap_file_->current_frame->flags.encoding);
+ source_name = get_data_source_name(source);
+ byte_view_tab_->addTab(source_name, get_data_source_tvb(source), cap_file_->edt->tree, proto_tree_, (packet_char_enc)cap_file_->current_frame->flags.encoding);
+ wmem_free(NULL, source_name);
}
byte_view_tab_->setCurrentIndex(0);
}