aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2015-01-17 21:17:24 -0500
committerMichael Mann <mmann78@netscape.net>2015-01-18 04:15:18 +0000
commita1f2342e13c576ae4899bd11e54d350b1ea23625 (patch)
tree5cbd19df87aecbcfb7ce6b145fbf9bcd7bb2ff39 /ui
parentef7e8aa065a485edf4a9aba299ceb15a19ae0dd0 (diff)
Miscellaneous ep_strdup_printf replacement.
Change-Id: I973c672e9d573ad67e9b9fd82a5610aaf8a74efa Reviewed-on: https://code.wireshark.org/review/6605 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
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);
}