aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
Diffstat (limited to 'ui')
-rw-r--r--ui/cli/tap-camelsrt.c6
-rw-r--r--ui/cli/tap-comparestat.c6
-rw-r--r--ui/cli/tap-diameter-avp.c6
-rw-r--r--ui/cli/tap-endpoints.c6
-rw-r--r--ui/cli/tap-expert.c6
-rw-r--r--ui/cli/tap-follow.c4
-rw-r--r--ui/cli/tap-gsm_astat.c4
-rw-r--r--ui/cli/tap-hosts.c6
-rw-r--r--ui/cli/tap-httpstat.c6
-rw-r--r--ui/cli/tap-icmpstat.c6
-rw-r--r--ui/cli/tap-icmpv6stat.c6
-rw-r--r--ui/cli/tap-iostat.c6
-rw-r--r--ui/cli/tap-iousers.c6
-rw-r--r--ui/cli/tap-macltestat.c4
-rw-r--r--ui/cli/tap-protocolinfo.c6
-rw-r--r--ui/cli/tap-protohierstat.c6
-rw-r--r--ui/cli/tap-rlcltestat.c4
-rw-r--r--ui/cli/tap-rpcprogs.c6
-rw-r--r--ui/cli/tap-rtd.c6
-rw-r--r--ui/cli/tap-rtp.c4
-rw-r--r--ui/cli/tap-rtspstat.c6
-rw-r--r--ui/cli/tap-sctpchunkstat.c6
-rw-r--r--ui/cli/tap-simple_stattable.c6
-rw-r--r--ui/cli/tap-sipstat.c6
-rw-r--r--ui/cli/tap-smbsids.c6
-rw-r--r--ui/cli/tap-srt.c6
-rw-r--r--ui/cli/tap-stats_tree.c5
-rw-r--r--ui/cli/tap-sv.c6
-rw-r--r--ui/cli/tap-wspstat.c6
-rw-r--r--ui/gtk/compare_stat.c6
-rw-r--r--ui/gtk/conversations_table.c12
-rw-r--r--ui/gtk/dcerpc_stat.c6
-rw-r--r--ui/gtk/expert_comp_dlg.c20
-rw-r--r--ui/gtk/export_object_dlg.c6
-rw-r--r--ui/gtk/follow_stream.c5
-rw-r--r--ui/gtk/gsm_map_summary.c6
-rw-r--r--ui/gtk/hostlist_table.c12
-rw-r--r--ui/gtk/iax2_analysis.c6
-rw-r--r--ui/gtk/io_stat.c6
-rw-r--r--ui/gtk/lbm_stream_dlg.c6
-rw-r--r--ui/gtk/lbm_uimflow_dlg.c6
-rw-r--r--ui/gtk/mac_lte_stat_dlg.c6
-rw-r--r--ui/gtk/main.c5
-rw-r--r--ui/gtk/mtp3_summary.c6
-rw-r--r--ui/gtk/response_time_delay_table.c6
-rw-r--r--ui/gtk/rlc_lte_stat_dlg.c6
-rw-r--r--ui/gtk/rpc_stat.c6
-rw-r--r--ui/gtk/rtp_analysis.c6
-rw-r--r--ui/gtk/sctp_chunk_stat.c6
-rw-r--r--ui/gtk/service_response_time_table.c6
-rw-r--r--ui/gtk/simple_stattable.c6
-rw-r--r--ui/gtk/stats_tree_stat.c6
-rw-r--r--ui/gtk/wlan_stat_dlg.c12
-rw-r--r--ui/mcast_stream.c8
-rw-r--r--ui/qt/bluetooth_device_dialog.cpp6
-rw-r--r--ui/qt/bluetooth_hci_summary_dialog.cpp6
-rw-r--r--ui/qt/expert_info_dialog.cpp6
-rw-r--r--ui/qt/gsm_map_summary_dialog.cpp6
-rw-r--r--ui/qt/io_graph_dialog.cpp13
-rw-r--r--ui/qt/lbm_lbtrm_transport_dialog.cpp6
-rw-r--r--ui/qt/lbm_lbtru_transport_dialog.cpp6
-rw-r--r--ui/qt/lbm_stream_dialog.cpp6
-rw-r--r--ui/qt/mtp3_summary_dialog.cpp6
-rw-r--r--ui/qt/wireshark_dialog.cpp6
-rw-r--r--ui/rtp_stream.c6
-rw-r--r--ui/tap-rlc-graph.c12
-rw-r--r--ui/tap-sctp-analysis.c6
-rw-r--r--ui/tap-tcp-stream.c12
-rw-r--r--ui/tap_export_pdu.c8
-rw-r--r--ui/voip_calls.c120
70 files changed, 284 insertions, 292 deletions
diff --git a/ui/cli/tap-camelsrt.c b/ui/cli/tap-camelsrt.c
index 6277d357d8..7e64bf6449 100644
--- a/ui/cli/tap-camelsrt.c
+++ b/ui/cli/tap-camelsrt.c
@@ -210,7 +210,7 @@ static void camelsrt_draw(void *phs)
static void camelsrt_init(const char *opt_arg, void *userdata _U_)
{
struct camelsrt_t *p_camelsrt;
- GString *error_string;
+ gchar *error_string;
p_camelsrt = g_new(struct camelsrt_t, 1);
if (!strncmp(opt_arg, "camel,srt,", 9)) {
@@ -234,8 +234,8 @@ static void camelsrt_init(const char *opt_arg, void *userdata _U_)
g_free(p_camelsrt);
fprintf(stderr, "tshark: Couldn't register camel,srt tap: %s\n",
- error_string->str);
- g_string_free(error_string, TRUE);
+ error_string);
+ wmem_free(NULL, error_string);
exit(1);
}
diff --git a/ui/cli/tap-comparestat.c b/ui/cli/tap-comparestat.c
index 286310103a..e11b1a132d 100644
--- a/ui/cli/tap-comparestat.c
+++ b/ui/cli/tap-comparestat.c
@@ -530,7 +530,7 @@ comparestat_init(const char *opt_arg, void *userdata _U_)
{
comparestat_t *cs;
const char *filter = NULL;
- GString *error_string;
+ gchar *error_string;
gint start, stop, ttl, order, pos = 0;
gdouble variance;
@@ -581,8 +581,8 @@ comparestat_init(const char *opt_arg, void *userdata _U_)
g_hash_table_destroy(cs->packet_set);
g_free(cs);
- fprintf(stderr, "tshark: Couldn't register compare tap: %s\n", error_string->str);
- g_string_free(error_string, TRUE);
+ fprintf(stderr, "tshark: Couldn't register compare tap: %s\n", error_string);
+ wmem_free(NULL, error_string);
exit(1);
}
}
diff --git a/ui/cli/tap-diameter-avp.c b/ui/cli/tap-diameter-avp.c
index 02106cd9f4..51223c8711 100644
--- a/ui/cli/tap-diameter-avp.c
+++ b/ui/cli/tap-diameter-avp.c
@@ -220,7 +220,7 @@ diameteravp_init(const char *opt_arg, void *userdata _U_)
guint opt_count = 0;
guint opt_idx = 0;
GString *filter = NULL;
- GString *error_string = NULL;
+ gchar *error_string = NULL;
ds = g_new(diameteravp_t, 1);
ds->frame = 0;
@@ -263,8 +263,8 @@ diameteravp_init(const char *opt_arg, void *userdata _U_)
g_free(ds);
fprintf(stderr, "tshark: Couldn't register diam,csv tap: %s\n",
- error_string->str);
- g_string_free(error_string, TRUE);
+ error_string);
+ wmem_free(NULL, error_string);
exit(1);
}
}
diff --git a/ui/cli/tap-endpoints.c b/ui/cli/tap-endpoints.c
index 5e261bd29b..9aec736047 100644
--- a/ui/cli/tap-endpoints.c
+++ b/ui/cli/tap-endpoints.c
@@ -113,7 +113,7 @@ endpoints_draw(void *arg)
void init_hostlists(struct register_ct *ct, const char *filter)
{
endpoints_t *iu;
- GString *error_string;
+ gchar *error_string;
iu = g_new0(endpoints_t, 1);
iu->type = proto_get_protocol_short_name(find_protocol_by_id(get_conversation_proto_id(ct)));
@@ -124,8 +124,8 @@ void init_hostlists(struct register_ct *ct, const char *filter)
if (error_string) {
g_free(iu);
fprintf(stderr, "tshark: Couldn't register endpoint tap: %s\n",
- error_string->str);
- g_string_free(error_string, TRUE);
+ error_string);
+ wmem_free(NULL, error_string);
exit(1);
}
diff --git a/ui/cli/tap-expert.c b/ui/cli/tap-expert.c
index 07fdfb5f6c..be92d150dd 100644
--- a/ui/cli/tap-expert.c
+++ b/ui/cli/tap-expert.c
@@ -195,7 +195,7 @@ static void expert_stat_init(const char *opt_arg, void *userdata _U_)
{
const char *args = NULL;
const char *filter = NULL;
- GString *error_string;
+ gchar *error_string;
expert_tapdata_t *hs;
int n;
@@ -257,8 +257,8 @@ static void expert_stat_init(const char *opt_arg, void *userdata _U_)
expert_stat_packet,
expert_stat_draw);
if (error_string) {
- printf("Expert tap error (%s)!\n", error_string->str);
- g_string_free(error_string, TRUE);
+ printf("Expert tap error (%s)!\n", error_string);
+ wmem_free(NULL, error_string);
g_free(hs);
exit(1);
}
diff --git a/ui/cli/tap-follow.c b/ui/cli/tap-follow.c
index 9d2b2d0cc9..cfce4a9c9c 100644
--- a/ui/cli/tap-follow.c
+++ b/ui/cli/tap-follow.c
@@ -445,7 +445,7 @@ static void follow_stream(const char *opt_argp, void *userdata)
{
follow_info_t *follow_info;
cli_follow_info_t* cli_follow_info;
- GString *errp;
+ gchar *errp;
register_follow_t* follower = (register_follow_t*)userdata;
follow_index_filter_func index_filter;
follow_address_filter_func address_filter;
@@ -488,7 +488,7 @@ static void follow_stream(const char *opt_argp, void *userdata)
if (errp != NULL)
{
follow_free(follow_info);
- g_string_free(errp, TRUE);
+ wmem_free(NULL, errp);
follow_exit("Error registering tap listener.");
}
}
diff --git a/ui/cli/tap-gsm_astat.c b/ui/cli/tap-gsm_astat.c
index 8b5bb2b5ab..7dc26e3d07 100644
--- a/ui/cli/tap-gsm_astat.c
+++ b/ui/cli/tap-gsm_astat.c
@@ -320,7 +320,7 @@ static void
gsm_a_stat_init(const char *opt_arg _U_, void *userdata _U_)
{
gsm_a_stat_t *stat_p;
- GString *err_p;
+ gchar *err_p;
stat_p = g_new(gsm_a_stat_t, 1);
@@ -335,7 +335,7 @@ gsm_a_stat_init(const char *opt_arg _U_, void *userdata _U_)
if (err_p != NULL)
{
g_free(stat_p);
- g_string_free(err_p, TRUE);
+ wmem_free(NULL, err_p);
exit(1);
}
diff --git a/ui/cli/tap-hosts.c b/ui/cli/tap-hosts.c
index f81a9fc739..1837738b09 100644
--- a/ui/cli/tap-hosts.c
+++ b/ui/cli/tap-hosts.c
@@ -95,7 +95,7 @@ hosts_draw(void *dummy _U_)
static void
hosts_init(const char *opt_arg, void *userdata _U_)
{
- GString *error_string;
+ gchar *error_string;
gchar **tokens;
gint opt_count;
@@ -128,8 +128,8 @@ hosts_init(const char *opt_arg, void *userdata _U_)
if (error_string) {
/* error, we failed to attach to the tap. clean up */
fprintf(stderr, "tshark: Couldn't register " TAP_NAME " tap: %s\n",
- error_string->str);
- g_string_free(error_string, TRUE);
+ error_string);
+ wmem_free(NULL, error_string);
exit(1);
}
}
diff --git a/ui/cli/tap-httpstat.c b/ui/cli/tap-httpstat.c
index 6b7334b223..ae49a0fce8 100644
--- a/ui/cli/tap-httpstat.c
+++ b/ui/cli/tap-httpstat.c
@@ -284,7 +284,7 @@ httpstat_init(const char *opt_arg, void *userdata _U_)
{
httpstat_t *sp;
const char *filter = NULL;
- GString *error_string;
+ gchar *error_string;
if (!strncmp (opt_arg, "http,stat,", 10)) {
filter = opt_arg+10;
@@ -314,8 +314,8 @@ httpstat_init(const char *opt_arg, void *userdata _U_)
g_free(sp->filter);
g_free(sp);
fprintf (stderr, "tshark: Couldn't register http,stat tap: %s\n",
- error_string->str);
- g_string_free(error_string, TRUE);
+ error_string);
+ wmem_free(NULL, error_string);
exit(1);
}
diff --git a/ui/cli/tap-icmpstat.c b/ui/cli/tap-icmpstat.c
index 9102cf32fe..6db273b0de 100644
--- a/ui/cli/tap-icmpstat.c
+++ b/ui/cli/tap-icmpstat.c
@@ -270,7 +270,7 @@ icmpstat_init(const char *opt_arg, void *userdata _U_)
{
icmpstat_t *icmpstat;
const char *filter = NULL;
- GString *error_string;
+ gchar *error_string;
if (strstr(opt_arg, "icmp,srt,"))
filter = opt_arg + strlen("icmp,srt,");
@@ -305,8 +305,8 @@ icmpstat_init(const char *opt_arg, void *userdata _U_)
g_free(icmpstat);
fprintf(stderr, "tshark: Couldn't register icmp,srt tap: %s\n",
- error_string->str);
- g_string_free(error_string, TRUE);
+ error_string);
+ wmem_free(NULL, error_string);
exit(1);
}
}
diff --git a/ui/cli/tap-icmpv6stat.c b/ui/cli/tap-icmpv6stat.c
index 6c2a59d0d7..9c5d372684 100644
--- a/ui/cli/tap-icmpv6stat.c
+++ b/ui/cli/tap-icmpv6stat.c
@@ -271,7 +271,7 @@ icmpv6stat_init(const char *opt_arg, void *userdata _U_)
{
icmpv6stat_t *icmpv6stat;
const char *filter = NULL;
- GString *error_string;
+ gchar *error_string;
if (strstr(opt_arg, "icmpv6,srt,"))
filter = opt_arg + strlen("icmpv6,srt,");
@@ -306,8 +306,8 @@ icmpv6stat_init(const char *opt_arg, void *userdata _U_)
g_free(icmpv6stat);
fprintf(stderr, "tshark: Couldn't register icmpv6,srt tap: %s\n",
- error_string->str);
- g_string_free(error_string, TRUE);
+ error_string);
+ wmem_free(NULL, error_string);
exit(1);
}
}
diff --git a/ui/cli/tap-iostat.c b/ui/cli/tap-iostat.c
index d481e1e898..5d3e6ee601 100644
--- a/ui/cli/tap-iostat.c
+++ b/ui/cli/tap-iostat.c
@@ -1220,7 +1220,7 @@ iostat_draw(void *arg)
static void
register_io_tap(io_stat_t *io, int i, const char *filter)
{
- GString *error_string;
+ gchar *error_string;
const char *flt;
int j;
size_t namelen;
@@ -1372,8 +1372,8 @@ register_io_tap(io_stat_t *io, int i, const char *filter)
g_free(io->items);
g_free(io);
fprintf(stderr, "\ntshark: Couldn't register io,stat tap: %s\n",
- error_string->str);
- g_string_free(error_string, TRUE);
+ error_string);
+ wmem_free(NULL, error_string);
exit(1);
}
}
diff --git a/ui/cli/tap-iousers.c b/ui/cli/tap-iousers.c
index 06f02697ac..fb7e0d2f46 100644
--- a/ui/cli/tap-iousers.c
+++ b/ui/cli/tap-iousers.c
@@ -215,7 +215,7 @@ iousers_draw(void *arg)
void init_iousers(struct register_ct *ct, const char *filter)
{
io_users_t *iu;
- GString *error_string;
+ gchar *error_string;
iu = g_new0(io_users_t, 1);
iu->type = proto_get_protocol_short_name(find_protocol_by_id(get_conversation_proto_id(ct)));
@@ -226,8 +226,8 @@ void init_iousers(struct register_ct *ct, const char *filter)
if (error_string) {
g_free(iu);
fprintf(stderr, "tshark: Couldn't register conversations tap: %s\n",
- error_string->str);
- g_string_free(error_string, TRUE);
+ error_string);
+ wmem_free(NULL, error_string);
exit(1);
}
diff --git a/ui/cli/tap-macltestat.c b/ui/cli/tap-macltestat.c
index c50dab9a87..d5afbdd4eb 100644
--- a/ui/cli/tap-macltestat.c
+++ b/ui/cli/tap-macltestat.c
@@ -517,7 +517,7 @@ static void mac_lte_stat_init(const char *opt_arg, void *userdata _U_)
{
mac_lte_stat_t *hs;
const char *filter = NULL;
- GString *error_string;
+ gchar *error_string;
/* Check for a filter string */
if (strncmp(opt_arg, "mac-lte,stat,", 13) == 0) {
@@ -539,7 +539,7 @@ static void mac_lte_stat_init(const char *opt_arg, void *userdata _U_)
mac_lte_stat_packet,
mac_lte_stat_draw);
if (error_string) {
- g_string_free(error_string, TRUE);
+ wmem_free(NULL, error_string);
g_free(hs);
exit(1);
}
diff --git a/ui/cli/tap-protocolinfo.c b/ui/cli/tap-protocolinfo.c
index 23581bc127..8be62703ee 100644
--- a/ui/cli/tap-protocolinfo.c
+++ b/ui/cli/tap-protocolinfo.c
@@ -87,7 +87,7 @@ protocolinfo_init(const char *opt_arg, void *userdata _U_)
const char *field = NULL;
const char *filter = NULL;
header_field_info *hfi;
- GString *error_string;
+ gchar *error_string;
if (!strncmp("proto,colinfo,", opt_arg, 14)) {
filter = opt_arg+14;
@@ -120,8 +120,8 @@ protocolinfo_init(const char *opt_arg, void *userdata _U_)
if (error_string) {
/* error, we failed to attach to the tap. complain and clean up */
fprintf(stderr, "tshark: Couldn't register proto,colinfo tap: %s\n",
- error_string->str);
- g_string_free(error_string, TRUE);
+ error_string);
+ wmem_free(NULL, error_string);
g_free(rs->filter);
g_free(rs);
diff --git a/ui/cli/tap-protohierstat.c b/ui/cli/tap-protohierstat.c
index 6fe4096a69..24d8365c46 100644
--- a/ui/cli/tap-protohierstat.c
+++ b/ui/cli/tap-protohierstat.c
@@ -170,7 +170,7 @@ protohierstat_init(const char *opt_arg, void *userdata _U_)
phs_t *rs;
int pos = 0;
const char *filter = NULL;
- GString *error_string;
+ gchar *error_string;
if (strcmp("io,phs", opt_arg) == 0) {
/* No arguments */
@@ -198,8 +198,8 @@ protohierstat_init(const char *opt_arg, void *userdata _U_)
g_free(rs);
fprintf(stderr, "tshark: Couldn't register io,phs tap: %s\n",
- error_string->str);
- g_string_free(error_string, TRUE);
+ error_string);
+ wmem_free(NULL, error_string);
exit(1);
}
}
diff --git a/ui/cli/tap-rlcltestat.c b/ui/cli/tap-rlcltestat.c
index 546d2a246a..1cbe48eb4e 100644
--- a/ui/cli/tap-rlcltestat.c
+++ b/ui/cli/tap-rlcltestat.c
@@ -365,7 +365,7 @@ static void rlc_lte_stat_init(const char *opt_arg, void *userdata _U_)
{
rlc_lte_stat_t *hs;
const char *filter = NULL;
- GString *error_string;
+ gchar *error_string;
/* Check for a filter string */
if (strncmp(opt_arg, "rlc-lte,stat,", 13) == 0) {
@@ -392,7 +392,7 @@ static void rlc_lte_stat_init(const char *opt_arg, void *userdata _U_)
rlc_lte_stat_packet,
rlc_lte_stat_draw);
if (error_string) {
- g_string_free(error_string, TRUE);
+ wmem_free(NULL, error_string);
g_free(hs);
exit(1);
}
diff --git a/ui/cli/tap-rpcprogs.c b/ui/cli/tap-rpcprogs.c
index 798062087d..ee2c9e7b77 100644
--- a/ui/cli/tap-rpcprogs.c
+++ b/ui/cli/tap-rpcprogs.c
@@ -211,7 +211,7 @@ rpcprogs_draw(void *dummy _U_)
static void
rpcprogs_init(const char *opt_arg _U_, void *userdata _U_)
{
- GString *error_string;
+ gchar *error_string;
if (already_enabled) {
return;
@@ -221,8 +221,8 @@ rpcprogs_init(const char *opt_arg _U_, void *userdata _U_)
error_string = register_tap_listener("rpc", NULL, NULL, 0, NULL, rpcprogs_packet, rpcprogs_draw);
if (error_string) {
fprintf(stderr, "tshark: Couldn't register rpc,programs tap: %s\n",
- error_string->str);
- g_string_free(error_string, TRUE);
+ error_string);
+ wmem_free(NULL, error_string);
exit(1);
}
}
diff --git a/ui/cli/tap-rtd.c b/ui/cli/tap-rtd.c
index 2e43286b62..c37d02713a 100644
--- a/ui/cli/tap-rtd.c
+++ b/ui/cli/tap-rtd.c
@@ -102,7 +102,7 @@ rtd_draw(void *arg)
static void
init_rtd_tables(register_rtd_t* rtd, const char *filter)
{
- GString *error_string;
+ gchar *error_string;
rtd_t* ui;
ui = g_new0(rtd_t, 1);
@@ -116,8 +116,8 @@ init_rtd_tables(register_rtd_t* rtd, const char *filter)
error_string = register_tap_listener(get_rtd_tap_listener_name(rtd), &ui->rtd, filter, 0, NULL, get_rtd_packet_func(rtd), rtd_draw);
if (error_string) {
free_rtd_table(&ui->rtd.stat_table, NULL, NULL);
- fprintf(stderr, "tshark: Couldn't register srt tap: %s\n", error_string->str);
- g_string_free(error_string, TRUE);
+ fprintf(stderr, "tshark: Couldn't register srt tap: %s\n", error_string);
+ wmem_free(NULL, error_string);
exit(1);
}
}
diff --git a/ui/cli/tap-rtp.c b/ui/cli/tap-rtp.c
index 71243474de..230f356087 100644
--- a/ui/cli/tap-rtp.c
+++ b/ui/cli/tap-rtp.c
@@ -139,7 +139,7 @@ rtp_streams_stat_draw(void *arg _U_)
static void
rtp_streams_stat_init(const char *opt_arg _U_, void *userdata _U_)
{
- GString *err_p;
+ gchar *err_p;
err_p =
register_tap_listener("rtp", &the_tapinfo_struct, NULL, 0,
@@ -149,7 +149,7 @@ rtp_streams_stat_init(const char *opt_arg _U_, void *userdata _U_)
if (err_p != NULL)
{
- g_string_free(err_p, TRUE);
+ wmem_free(NULL, err_p);
exit(1);
}
diff --git a/ui/cli/tap-rtspstat.c b/ui/cli/tap-rtspstat.c
index 20d15e4640..d91167a30d 100644
--- a/ui/cli/tap-rtspstat.c
+++ b/ui/cli/tap-rtspstat.c
@@ -236,7 +236,7 @@ rtspstat_init(const char *opt_arg, void *userdata _U_)
{
rtspstat_t *sp;
const char *filter = NULL;
- GString *error_string;
+ gchar *error_string;
if (!strncmp (opt_arg, "rtsp,stat,", 10)) {
filter = opt_arg+10;
@@ -266,8 +266,8 @@ rtspstat_init(const char *opt_arg, void *userdata _U_)
g_free(sp->filter);
g_free(sp);
fprintf (stderr, "tshark: Couldn't register rtsp,stat tap: %s\n",
- error_string->str);
- g_string_free(error_string, TRUE);
+ error_string);
+ wmem_free(NULL, error_string);
exit(1);
}
diff --git a/ui/cli/tap-sctpchunkstat.c b/ui/cli/tap-sctpchunkstat.c
index 2d41d362ae..cb8efdc42b 100644
--- a/ui/cli/tap-sctpchunkstat.c
+++ b/ui/cli/tap-sctpchunkstat.c
@@ -198,7 +198,7 @@ static void
sctpstat_init(const char *opt_arg, void *userdata _U_)
{
sctpstat_t *hs;
- GString *error_string;
+ gchar *error_string;
hs = (sctpstat_t *)g_malloc(sizeof(sctpstat_t));
if (!strncmp(opt_arg, "sctp,stat,", 11)) {
@@ -218,8 +218,8 @@ sctpstat_init(const char *opt_arg, void *userdata _U_)
g_free(hs);
fprintf(stderr, "tshark: Couldn't register sctp,stat tap: %s\n",
- error_string->str);
- g_string_free(error_string, TRUE);
+ error_string);
+ wmem_free(NULL, error_string);
exit(1);
}
}
diff --git a/ui/cli/tap-simple_stattable.c b/ui/cli/tap-simple_stattable.c
index 9f52eb458d..d722ba2f0f 100644
--- a/ui/cli/tap-simple_stattable.c
+++ b/ui/cli/tap-simple_stattable.c
@@ -103,7 +103,7 @@ simple_draw(void *arg)
static void
init_stat_table(stat_tap_table_ui *new_stat_tap, const char *filter)
{
- GString *error_string;
+ gchar *error_string;
table_stat_t* ui;
ui = g_new0(table_stat_t, 1);
@@ -116,8 +116,8 @@ init_stat_table(stat_tap_table_ui *new_stat_tap, const char *filter)
error_string = register_tap_listener(new_stat_tap->tap_name, &ui->stats, filter, 0, NULL, new_stat_tap->packet_func, simple_draw);
if (error_string) {
/* free_rtd_table(&ui->rtd.stat_table, NULL, NULL); */
- fprintf(stderr, "tshark: Couldn't register tap: %s\n", error_string->str);
- g_string_free(error_string, TRUE);
+ fprintf(stderr, "tshark: Couldn't register tap: %s\n", error_string);
+ wmem_free(NULL, error_string);
exit(1);
}
}
diff --git a/ui/cli/tap-sipstat.c b/ui/cli/tap-sipstat.c
index a7936102db..bac6b0f4f5 100644
--- a/ui/cli/tap-sipstat.c
+++ b/ui/cli/tap-sipstat.c
@@ -394,7 +394,7 @@ sipstat_init(const char *opt_arg, void *userdata _U_)
{
sipstat_t *sp;
const char *filter = NULL;
- GString *error_string;
+ gchar *error_string;
if (strncmp (opt_arg, "sip,stat,", 9) == 0) {
filter = opt_arg+9;
@@ -424,8 +424,8 @@ sipstat_init(const char *opt_arg, void *userdata _U_)
g_free(sp->filter);
g_free(sp);
fprintf (stderr, "tshark: Couldn't register sip,stat tap: %s\n",
- error_string->str);
- g_string_free(error_string, TRUE);
+ error_string);
+ wmem_free(NULL, error_string);
exit(1);
}
diff --git a/ui/cli/tap-smbsids.c b/ui/cli/tap-smbsids.c
index 0234281e28..ce6f3f6be9 100644
--- a/ui/cli/tap-smbsids.c
+++ b/ui/cli/tap-smbsids.c
@@ -66,7 +66,7 @@ smbsids_draw(void *pss _U_)
static void
smbsids_init(const char *opt_arg _U_, void *userdata _U_)
{
- GString *error_string;
+ gchar *error_string;
if (!sid_name_snooping) {
fprintf(stderr, "The -z smb,sids function needs SMB/SID-Snooping to be enabled.\n");
@@ -81,8 +81,8 @@ smbsids_init(const char *opt_arg _U_, void *userdata _U_)
error_string = register_tap_listener("smb", NULL, NULL, 0, NULL, smbsids_packet, smbsids_draw);
if (error_string) {
fprintf(stderr, "tshark: Couldn't register smb,sids tap:%s\n",
- error_string->str);
- g_string_free(error_string, TRUE);
+ error_string);
+ wmem_free(NULL, error_string);
exit(1);
}
}
diff --git a/ui/cli/tap-srt.c b/ui/cli/tap-srt.c
index 32fde53594..d6a965e484 100644
--- a/ui/cli/tap-srt.c
+++ b/ui/cli/tap-srt.c
@@ -118,7 +118,7 @@ static void
init_srt_tables(register_srt_t* srt, const char *filter)
{
srt_t *ui;
- GString *error_string;
+ gchar *error_string;
ui = g_new0(srt_t, 1);
ui->type = proto_get_protocol_short_name(find_protocol_by_id(get_srt_proto_id(srt)));
@@ -130,8 +130,8 @@ init_srt_tables(register_srt_t* srt, const char *filter)
if (error_string) {
free_srt_table(srt, global_srt_array, NULL, NULL);
g_free(ui);
- fprintf(stderr, "tshark: Couldn't register srt tap: %s\n", error_string->str);
- g_string_free(error_string, TRUE);
+ fprintf(stderr, "tshark: Couldn't register srt tap: %s\n", error_string);
+ wmem_free(NULL, error_string);
exit(1);
}
}
diff --git a/ui/cli/tap-stats_tree.c b/ui/cli/tap-stats_tree.c
index f30a5dc23b..fedf22da3b 100644
--- a/ui/cli/tap-stats_tree.c
+++ b/ui/cli/tap-stats_tree.c
@@ -64,7 +64,7 @@ static void
init_stats_tree(const char *opt_arg, void *userdata _U_)
{
char *abbr = stats_tree_get_abbr(opt_arg);
- GString *error_string;
+ gchar *error_string;
stats_tree_cfg *cfg = NULL;
stats_tree *st = NULL;
@@ -99,7 +99,8 @@ init_stats_tree(const char *opt_arg, void *userdata _U_)
draw_stats_tree);
if (error_string) {
- report_failure("stats_tree for: %s failed to attach to the tap: %s", cfg->name, error_string->str);
+ report_failure("stats_tree for: %s failed to attach to the tap: %s", cfg->name, error_string);
+ wmem_free(NULL, error_string);
return;
}
diff --git a/ui/cli/tap-sv.c b/ui/cli/tap-sv.c
index c7a43ef294..731fe42a67 100644
--- a/ui/cli/tap-sv.c
+++ b/ui/cli/tap-sv.c
@@ -56,7 +56,7 @@ sv_packet(void *prs _U_, packet_info *pinfo, epan_dissect_t *edt _U_, const void
static void
svstat_init(const char *opt_arg _U_, void *userdata _U_)
{
- GString *error_string;
+ gchar *error_string;
error_string = register_tap_listener(
"sv",
@@ -69,8 +69,8 @@ svstat_init(const char *opt_arg _U_, void *userdata _U_)
if (error_string) {
/* error, we failed to attach to the tap. clean up */
fprintf(stderr, "tshark: Couldn't register sv,stat tap: %s\n",
- error_string->str);
- g_string_free(error_string, TRUE);
+ error_string);
+ wmem_free(NULL, error_string);
exit(1);
}
}
diff --git a/ui/cli/tap-wspstat.c b/ui/cli/tap-wspstat.c
index b2a0ba46a8..f65280bbbe 100644
--- a/ui/cli/tap-wspstat.c
+++ b/ui/cli/tap-wspstat.c
@@ -216,7 +216,7 @@ wspstat_init(const char *opt_arg, void *userdata _U_)
wspstat_t *sp;
const char *filter = NULL;
guint32 i;
- GString *error_string;
+ gchar *error_string;
wsp_status_code_t *sc;
const value_string *wsp_vals_status_p;
@@ -272,8 +272,8 @@ wspstat_init(const char *opt_arg, void *userdata _U_)
g_hash_table_foreach( sp->hash, (GHFunc) wsp_free_hash_table, NULL ) ;
g_hash_table_destroy( sp->hash );
fprintf(stderr, "tshark: Couldn't register wsp,stat tap: %s\n",
- error_string->str);
- g_string_free(error_string, TRUE);
+ error_string);
+ wmem_free(NULL, error_string);
exit(1);
}
}
diff --git a/ui/gtk/compare_stat.c b/ui/gtk/compare_stat.c
index 7239d5bace..fe2c5e634a 100644
--- a/ui/gtk/compare_stat.c
+++ b/ui/gtk/compare_stat.c
@@ -699,7 +699,7 @@ gtk_comparestat_init(const char *opt_arg, void* userdata _U_)
gdouble variance;
gint start, stop,ttl, order, pos=0;
const char *filter=NULL;
- GString *error_string;
+ gchar *error_string;
if(sscanf(opt_arg,"compare,%d,%d,%d,%d,%lf%n",&start, &stop, &ttl, &order, &variance, &pos)==5){
if(*(opt_arg+pos)==',')
@@ -791,8 +791,8 @@ gtk_comparestat_init(const char *opt_arg, void* userdata _U_)
error_string=register_tap_listener("ip", cs, filter, 0, comparestat_reset, comparestat_packet, comparestat_draw);
if(error_string){
- simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "%s", error_string->str);
- g_string_free(error_string, TRUE);
+ simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "%s", error_string);
+ wmem_free(NULL, error_string);
gtk_tree_store_clear(cs->simple_list);
g_hash_table_destroy(cs->packet_set);
g_hash_table_destroy(cs->ip_id_set);
diff --git a/ui/gtk/conversations_table.c b/ui/gtk/conversations_table.c
index 7fc02e2eb0..4927220aa5 100644
--- a/ui/gtk/conversations_table.c
+++ b/ui/gtk/conversations_table.c
@@ -70,7 +70,7 @@ reset_ct_table_data(conversations_table *ct)
{
char *display_name;
char title[256];
- GString *error_string;
+ gchar *error_string;
const char *filter;
GtkListStore *store;
@@ -82,8 +82,8 @@ reset_ct_table_data(conversations_table *ct)
error_string = set_tap_dfilter (&ct->hash, filter);
if (error_string) {
- simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "%s", error_string->str);
- g_string_free(error_string, TRUE);
+ simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "%s", error_string);
+ wmem_free(NULL, error_string);
return;
}
@@ -1925,7 +1925,7 @@ init_ct_table_page(conversations_table *conversations, GtkWidget *vbox, gboolean
tap_packet_cb packet_func)
{
int i;
- GString *error_string;
+ gchar *error_string;
char title[256];
GtkListStore *store;
@@ -2059,8 +2059,8 @@ init_ct_table_page(conversations_table *conversations, GtkWidget *vbox, gboolean
error_string=register_tap_listener(tap_name, &conversations->hash, filter, 0, reset_ct_table_data_cb, packet_func,
draw_ct_table_data_cb);
if(error_string){
- simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "%s", error_string->str);
- g_string_free(error_string, TRUE);
+ simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "%s", error_string);
+ wmem_free(NULL, error_string);
return FALSE;
}
diff --git a/ui/gtk/dcerpc_stat.c b/ui/gtk/dcerpc_stat.c
index e9186fdda7..a846f9c609 100644
--- a/ui/gtk/dcerpc_stat.c
+++ b/ui/gtk/dcerpc_stat.c
@@ -146,7 +146,7 @@ gtk_dcerpcstat_init(const char *opt_arg, void* userdata _U_)
int pos = 0;
const char *filter = NULL;
dcerpcstat_tap_data_t* tap_data;
- GString *error_string;
+ gchar *error_string;
/*
* XXX - DCE RPC statistics are maintained only by major version,
@@ -260,8 +260,8 @@ gtk_dcerpcstat_init(const char *opt_arg, void* userdata _U_)
error_string = register_tap_listener("dcerpc", &rs->data, filter, 0, dcerpcstat_reset, get_srt_packet_func(rs->srt), dcerpcstat_draw);
if(error_string){
/* error, we failed to attach to the tap. clean up */
- simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "%s", error_string->str);
- g_string_free(error_string, TRUE);
+ simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "%s", error_string);
+ wmem_free(NULL, error_string);
free_srt_table(rs->srt, rs->data.srt_array, NULL, NULL);
g_free(rs);
return;
diff --git a/ui/gtk/expert_comp_dlg.c b/ui/gtk/expert_comp_dlg.c
index 9450bbbbae..8087b47dda 100644
--- a/ui/gtk/expert_comp_dlg.c
+++ b/ui/gtk/expert_comp_dlg.c
@@ -143,7 +143,7 @@ expert_comp_select_filter_cb(GtkWidget *widget, gpointer callback_data, guint ca
{
expert_comp_dlg_t *ss = (expert_comp_dlg_t *)callback_data;
const char *filter;
- GString *error_string;
+ gchar *error_string;
ss->use_dfilter = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON (widget));
if (ss->use_dfilter) {
@@ -153,14 +153,14 @@ expert_comp_select_filter_cb(GtkWidget *widget, gpointer callback_data, guint ca
}
error_string = set_tap_dfilter (ss, filter);
if (error_string) {
- simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "%s", error_string->str);
- g_string_free(error_string, TRUE);
+ simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "%s", error_string);
+ wmem_free(NULL, error_string);
return;
}
error_string = set_tap_dfilter (ss->etd, filter);
if (error_string) {
- simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "%s", error_string->str);
- g_string_free(error_string, TRUE);
+ simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "%s", error_string);
+ wmem_free(NULL, error_string);
return;
}
@@ -791,7 +791,7 @@ static void
expert_comp_init(const char *opt_arg _U_, void* userdata _U_)
{
expert_comp_dlg_t *ss;
- GString *error_string;
+ gchar *error_string;
GtkWidget *temp_page, *details_page, *comments_page;
GtkWidget *main_nb;
GtkWidget *vbox;
@@ -950,8 +950,8 @@ expert_comp_init(const char *opt_arg _U_, void* userdata _U_)
expert_dlg_packet,
expert_dlg_draw);
if(error_string){
- simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "%s", error_string->str);
- g_string_free(error_string, TRUE);
+ simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "%s", error_string);
+ wmem_free(NULL, error_string);
g_free(ss->etd);
return;
}
@@ -964,8 +964,8 @@ expert_comp_init(const char *opt_arg _U_, void* userdata _U_)
error_string=register_tap_listener("expert", ss, NULL,
TL_REQUIRES_NOTHING, error_reset, error_packet, expert_comp_draw);
if(error_string){
- simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "%s", error_string->str);
- g_string_free(error_string, TRUE);
+ simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "%s", error_string);
+ wmem_free(NULL, error_string);
g_free(ss);
return;
}
diff --git a/ui/gtk/export_object_dlg.c b/ui/gtk/export_object_dlg.c
index ee1c3af8b3..4233480632 100644
--- a/ui/gtk/export_object_dlg.c
+++ b/ui/gtk/export_object_dlg.c
@@ -322,7 +322,7 @@ export_object_window(const gchar *tapname, const gchar *name, tap_packet_cb tap_
GtkTreeViewColumn *column;
GtkTreeSelection *selection;
GtkWidget *vbox, *bbox, *help_bt, *cancel_bt, *save_bt, *save_all_bt;
- GString *error_msg;
+ gchar *error_msg;
export_object_list_t *object_list;
gchar *window_title;
@@ -340,8 +340,8 @@ export_object_window(const gchar *tapname, const gchar *name, tap_packet_cb tap_
if (error_msg) {
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
- "Can't register %s tap: %s\n", name, error_msg->str);
- g_string_free(error_msg, TRUE);
+ "Can't register %s tap: %s\n", name, error_msg);
+ wmem_free(NULL, error_msg);
g_free(object_list);
return;
}
diff --git a/ui/gtk/follow_stream.c b/ui/gtk/follow_stream.c
index d12a6234c0..ad1e6b8d26 100644
--- a/ui/gtk/follow_stream.c
+++ b/ui/gtk/follow_stream.c
@@ -170,7 +170,7 @@ static void follow_stream_cb(register_follow_t* follower, follow_read_stream_fun
gchar *both_directions_string = NULL;
follow_info_t *follow_info;
gtk_follow_info_t *gtk_follow_info;
- GString *msg;
+ gchar *msg;
gboolean is_follow = FALSE;
guint32 ignore_stream;
char stream_window_title[256];
@@ -232,11 +232,12 @@ static void follow_stream_cb(register_follow_t* follower, follow_read_stream_fun
if (msg) {
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
"Can't register %s tap: %s\n",
- get_follow_tap_string(follower), msg->str);
+ get_follow_tap_string(follower), msg);
g_free(gtk_follow_info);
g_free(follow_info->filter_out_filter);
g_free(follow_info);
g_free(follow_filter);
+ wmem_free(NULL, msg);
return;
}
diff --git a/ui/gtk/gsm_map_summary.c b/ui/gtk/gsm_map_summary.c
index 15fd6b9644..1f261c0fcf 100644
--- a/ui/gtk/gsm_map_summary.c
+++ b/ui/gtk/gsm_map_summary.c
@@ -396,7 +396,7 @@ gsm_map_summary_packet(
void
register_tap_listener_gtk_gsm_map_summary(void)
{
- GString *err_p;
+ gchar *err_p;
memset((void *) &gsm_map_stat, 0, sizeof(gsm_map_stat_t));
@@ -408,8 +408,8 @@ register_tap_listener_gtk_gsm_map_summary(void)
if (err_p != NULL)
{
- simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "%s", err_p->str);
- g_string_free(err_p, TRUE);
+ simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "%s", err_p);
+ wmem_free(NULL, err_p);
exit(1);
}
diff --git a/ui/gtk/hostlist_table.c b/ui/gtk/hostlist_table.c
index e65f227392..1f72114a68 100644
--- a/ui/gtk/hostlist_table.c
+++ b/ui/gtk/hostlist_table.c
@@ -75,7 +75,7 @@ reset_host_table_data(hostlist_table *hosts)
{
char *display_name;
char title[256];
- GString *error_string;
+ gchar *error_string;
const char *filter;
GtkListStore *store;
@@ -86,8 +86,8 @@ reset_host_table_data(hostlist_table *hosts)
}
error_string = set_tap_dfilter (&hosts->hash, filter);
if (error_string) {
- simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "%s", error_string->str);
- g_string_free(error_string, TRUE);
+ simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "%s", error_string);
+ wmem_free(NULL, error_string);
return;
}
@@ -850,7 +850,7 @@ init_hostlist_table_page(hostlist_table *hosttable, GtkWidget *vbox, gboolean hi
const char *filter, tap_packet_cb packet_func)
{
guint i;
- GString *error_string;
+ gchar *error_string;
char title[256];
GtkListStore *store;
GtkWidget *tree;
@@ -1009,8 +1009,8 @@ init_hostlist_table_page(hostlist_table *hosttable, GtkWidget *vbox, gboolean hi
/* register the tap and rerun the taps on the packet list */
error_string=register_tap_listener(tap_name, &hosttable->hash, filter, 0, reset_hostlist_table_data_cb, packet_func, draw_hostlist_table_data_cb);
if(error_string){
- simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "%s", error_string->str);
- g_string_free(error_string, TRUE);
+ simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "%s", error_string);
+ wmem_free(NULL, error_string);
g_free(hosttable);
return FALSE;
}
diff --git a/ui/gtk/iax2_analysis.c b/ui/gtk/iax2_analysis.c
index 604f721ba3..1cf3b256ea 100644
--- a/ui/gtk/iax2_analysis.c
+++ b/ui/gtk/iax2_analysis.c
@@ -1864,7 +1864,7 @@ static void
on_refresh_bt_clicked(GtkWidget *bt _U_, gpointer data)
{
user_data_t *user_data = (user_data_t *)data;
- GString *error_string;
+ gchar *error_string;
/* remove tap listener */
remove_tap_listener(user_data);
@@ -1873,8 +1873,8 @@ on_refresh_bt_clicked(GtkWidget *bt _U_, gpointer data)
error_string = register_tap_listener("IAX2", user_data, NULL, 0,
iax2_reset, iax2_packet, iax2_draw);
if (error_string != NULL) {
- simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "%s", error_string->str);
- g_string_free(error_string, TRUE);
+ simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "%s", error_string);
+ wmem_free(NULL, error_string);
return;
}
diff --git a/ui/gtk/io_stat.c b/ui/gtk/io_stat.c
index b077429d56..6853d2116b 100644
--- a/ui/gtk/io_stat.c
+++ b/ui/gtk/io_stat.c
@@ -1068,11 +1068,11 @@ tap_iostat_draw(void *g)
be able to pick up the field values after the edt tree has been
pruned
*/
-static GString *
+static gchar *
enable_graph(io_stat_graph_t *gio, const char *filter, const char *field)
{
GString *real_filter = NULL;
- GString *err_msg;
+ gchar *err_msg;
gio->display = TRUE;
@@ -1155,7 +1155,7 @@ iostat_init(const char *opt_arg _U_, void* userdata _U_)
{1.0, 0.314, 1.0, 1.0} /* Light brilliant magenta */
};
- GString *error_string;
+ gchar *error_string;
io = g_new(io_stat_t,1);
io->needs_redraw = TRUE;
diff --git a/ui/gtk/lbm_stream_dlg.c b/ui/gtk/lbm_stream_dlg.c
index d3fea45ce1..df99266756 100644
--- a/ui/gtk/lbm_stream_dlg.c
+++ b/ui/gtk/lbm_stream_dlg.c
@@ -738,7 +738,7 @@ static void lbmc_stream_dlg_tap_draw(void * tap_data _U_)
/**************************************************************/
void lbmc_stream_dlg_stream_menu_cb(gpointer arg _U_)
{
- GString * err_msg;
+ gchar * err_msg;
if (global_stream_dialog_info != NULL)
{
@@ -755,8 +755,8 @@ void lbmc_stream_dlg_stream_menu_cb(gpointer arg _U_)
lbmc_stream_dlg_tap_draw);
if (err_msg != NULL)
{
- fprintf(stderr, "register_tap_listener: %s\n", err_msg->str);
- g_string_free(err_msg, TRUE);
+ fprintf(stderr, "register_tap_listener: %s\n", err_msg);
+ wmem_free(NULL, err_msg);
}
cf_retap_packets(&cfile);
}
diff --git a/ui/gtk/lbm_uimflow_dlg.c b/ui/gtk/lbm_uimflow_dlg.c
index b0993547b6..5ed9e3b625 100644
--- a/ui/gtk/lbm_uimflow_dlg.c
+++ b/ui/gtk/lbm_uimflow_dlg.c
@@ -241,7 +241,7 @@ static void lbmc_uim_flow_graph_on_ok_cb(GtkButton * button _U_, gpointer user_d
/* Scan for displayed packets (retap all packets) */
if (dialog_data.have_tap_listener == FALSE)
{
- GString * err_msg;
+ gchar * err_msg;
err_msg = register_tap_listener("lbm_uim",
&(dialog_data.tap_identifier),
@@ -252,8 +252,8 @@ static void lbmc_uim_flow_graph_on_ok_cb(GtkButton * button _U_, gpointer user_d
lbmc_uim_flow_tap_draw);
if (err_msg != NULL)
{
- fprintf(stderr, "register_tap_listener: %s\n", err_msg->str);
- g_string_free(err_msg, TRUE);
+ fprintf(stderr, "register_tap_listener: %s\n", err_msg);
+ wmem_free(NULL, err_msg);
}
dialog_data.have_tap_listener = TRUE;
}
diff --git a/ui/gtk/mac_lte_stat_dlg.c b/ui/gtk/mac_lte_stat_dlg.c
index 3057e3e8c2..af2e3b0bcb 100644
--- a/ui/gtk/mac_lte_stat_dlg.c
+++ b/ui/gtk/mac_lte_stat_dlg.c
@@ -1003,7 +1003,7 @@ static void gtk_mac_lte_stat_init(const char *opt_arg, void *userdata _U_)
{
mac_lte_stat_t *hs;
const char *filter = NULL;
- GString *error_string;
+ gchar *error_string;
GtkWidget *ues_scrolled_window;
GtkWidget *bbox;
GtkWidget *top_level_vbox;
@@ -1366,8 +1366,8 @@ static void gtk_mac_lte_stat_init(const char *opt_arg, void *userdata _U_)
mac_lte_stat_packet,
mac_lte_stat_draw);
if (error_string) {
- simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "%s", error_string->str);
- g_string_free(error_string, TRUE);
+ simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "%s", error_string);
+ wmem_free(NULL, error_string);
g_free(hs);
return;
}
diff --git a/ui/gtk/main.c b/ui/gtk/main.c
index 8850a4772a..89878a55d4 100644
--- a/ui/gtk/main.c
+++ b/ui/gtk/main.c
@@ -2536,14 +2536,9 @@ main(int argc, char *argv[])
#ifdef HAVE_PLUGINS
/* Register all the plugin types we have. */
- epan_register_plugin_types(); /* Types known to libwireshark */
wtap_register_plugin_types(); /* Types known to libwiretap */
codec_register_plugin_types(); /* Types known to libwscodecs */
- /* Scan for plugins. This does *not* call their registration routines;
- that's done later. */
- scan_plugins();
-
/* Register all libwiretap plugin modules. */
register_all_wiretap_modules();
diff --git a/ui/gtk/mtp3_summary.c b/ui/gtk/mtp3_summary.c
index 1917720449..c45bc48ba5 100644
--- a/ui/gtk/mtp3_summary.c
+++ b/ui/gtk/mtp3_summary.c
@@ -530,7 +530,7 @@ mtp3_summary_packet(
void
register_tap_listener_gtk_mtp3_summary(void)
{
- GString *err_p;
+ gchar *err_p;
memset((void *) &mtp3_stat, 0, sizeof(mtp3_stat));
@@ -542,8 +542,8 @@ register_tap_listener_gtk_mtp3_summary(void)
if (err_p != NULL)
{
- simple_dialog(ESD_TYPE_WARN, ESD_BTN_OK, "%s", err_p->str);
- g_string_free(err_p, TRUE);
+ simple_dialog(ESD_TYPE_WARN, ESD_BTN_OK, "%s", err_p);
+ wmem_free(NULL, err_p);
exit(1);
}
diff --git a/ui/gtk/response_time_delay_table.c b/ui/gtk/response_time_delay_table.c
index fb110fe018..fde0258083 100644
--- a/ui/gtk/response_time_delay_table.c
+++ b/ui/gtk/response_time_delay_table.c
@@ -275,7 +275,7 @@ init_rtd_tables(register_rtd_t* rtd, const char *filter)
{
rtd_t *rr;
gchar *str;
- GString *error_string;
+ gchar *error_string;
GtkWidget *bbox;
GtkWidget *close_bt;
@@ -304,8 +304,8 @@ init_rtd_tables(register_rtd_t* rtd, const char *filter)
error_string = register_tap_listener(get_rtd_tap_listener_name(rtd), &rr->data, filter, 0, rtd_reset, get_rtd_packet_func(rtd), rtd_draw);
if(error_string){
- simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "%s", error_string->str);
- g_string_free(error_string, TRUE);
+ simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "%s", error_string);
+ wmem_free(NULL, error_string);
free_rtd_table(&rr->data.stat_table, NULL, NULL);
g_free(rr);
return;
diff --git a/ui/gtk/rlc_lte_stat_dlg.c b/ui/gtk/rlc_lte_stat_dlg.c
index 6ff23b3ccd..55aced9fa0 100644
--- a/ui/gtk/rlc_lte_stat_dlg.c
+++ b/ui/gtk/rlc_lte_stat_dlg.c
@@ -1257,7 +1257,7 @@ static void gtk_rlc_lte_stat_init(const char *opt_arg, void *userdata _U_)
{
rlc_lte_stat_t *hs;
const char *filter = NULL;
- GString *error_string;
+ gchar *error_string;
GtkWidget *ues_scrolled_window;
GtkWidget *channels_scrolled_window;
GtkWidget *bbox;
@@ -1615,8 +1615,8 @@ static void gtk_rlc_lte_stat_init(const char *opt_arg, void *userdata _U_)
rlc_lte_stat_packet,
rlc_lte_stat_draw);
if (error_string) {
- simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "%s", error_string->str);
- g_string_free(error_string, TRUE);
+ simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "%s", error_string);
+ wmem_free(NULL, error_string);
g_free(hs);
return;
}
diff --git a/ui/gtk/rpc_stat.c b/ui/gtk/rpc_stat.c
index cf18aa910e..5b068a4418 100644
--- a/ui/gtk/rpc_stat.c
+++ b/ui/gtk/rpc_stat.c
@@ -191,7 +191,7 @@ gtk_rpcstat_init(const char *opt_arg, void* userdata _U_)
GtkWidget *close_bt;
int program, version, pos;
const char *filter=NULL;
- GString *error_string;
+ gchar *error_string;
rpcstat_tap_data_t* tap_data;
pos=0;
@@ -263,8 +263,8 @@ gtk_rpcstat_init(const char *opt_arg, void* userdata _U_)
error_string=register_tap_listener("rpc", &rs->data, filter, 0, rpcstat_reset, get_srt_packet_func(rs->srt), rpcstat_draw);
if(error_string){
- simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "%s", error_string->str);
- g_string_free(error_string, TRUE);
+ simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "%s", error_string);
+ wmem_free(NULL, error_string);
free_srt_table(rs->srt, rs->data.srt_array, NULL, NULL);
g_free(rs);
return;
diff --git a/ui/gtk/rtp_analysis.c b/ui/gtk/rtp_analysis.c
index daaa6d38e8..a9cb508007 100644
--- a/ui/gtk/rtp_analysis.c
+++ b/ui/gtk/rtp_analysis.c
@@ -2038,7 +2038,7 @@ static void draw_stat(user_data_t *user_data);
static void
on_refresh_bt_clicked(GtkWidget *bt _U_, user_data_t *user_data)
{
- GString *error_string;
+ gchar *error_string;
/* remove tap listener */
remove_tap_listener(user_data);
@@ -2047,8 +2047,8 @@ on_refresh_bt_clicked(GtkWidget *bt _U_, user_data_t *user_data)
error_string = register_tap_listener("rtp", user_data, NULL, 0,
rtp_reset, rtp_packet, rtp_draw);
if (error_string != NULL) {
- simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "%s", error_string->str);
- g_string_free(error_string, TRUE);
+ simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "%s", error_string);
+ wmem_free(NULL, error_string);
return;
}
diff --git a/ui/gtk/sctp_chunk_stat.c b/ui/gtk/sctp_chunk_stat.c
index edb5de543d..cbb516df62 100644
--- a/ui/gtk/sctp_chunk_stat.c
+++ b/ui/gtk/sctp_chunk_stat.c
@@ -263,7 +263,7 @@ static void
sctpstat_init(const char *opt_arg, void *userdata _U_)
{
sctpstat_t *hs;
- GString *error_string;
+ gchar *error_string;
GtkWidget *bbox;
GtkWidget *close_bt;
@@ -296,8 +296,8 @@ sctpstat_init(const char *opt_arg, void *userdata _U_)
sctpstat_packet,
sctpstat_draw);
if(error_string){
- simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "%s", error_string->str);
- g_string_free(error_string, TRUE);
+ simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "%s", error_string);
+ wmem_free(NULL, error_string);
g_free(hs->filter);
g_free(hs);
return;
diff --git a/ui/gtk/service_response_time_table.c b/ui/gtk/service_response_time_table.c
index c1f615849a..de4692b58a 100644
--- a/ui/gtk/service_response_time_table.c
+++ b/ui/gtk/service_response_time_table.c
@@ -699,7 +699,7 @@ init_srt_tables(register_srt_t* srt, const char *filter)
gchar *str;
GtkWidget *label;
char *filter_string, *tmp_filter_string;
- GString *error_string;
+ gchar *error_string;
GtkWidget *bbox;
GtkWidget *close_bt;
@@ -762,8 +762,8 @@ init_srt_tables(register_srt_t* srt, const char *filter)
error_string = register_tap_listener(get_srt_tap_listener_name(srt), &ss->data, filter, 0, srt_reset, get_srt_packet_func(srt), srt_draw);
if(error_string){
- simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "%s", error_string->str);
- g_string_free(error_string, TRUE);
+ simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "%s", error_string);
+ wmem_free(NULL, error_string);
free_srt_table(ss->srt, ss->data.srt_array, NULL, NULL);
g_free(ss);
return;
diff --git a/ui/gtk/simple_stattable.c b/ui/gtk/simple_stattable.c
index 669815d916..a7d60ecd95 100644
--- a/ui/gtk/simple_stattable.c
+++ b/ui/gtk/simple_stattable.c
@@ -196,7 +196,7 @@ static void
init_simple_stat_tables(stat_tap_table_ui *new_stat_tap, const char *filter)
{
simple_stat_t *ss;
- GString *error_string;
+ gchar *error_string;
GtkWidget *bbox;
GtkWidget *close_bt;
@@ -221,8 +221,8 @@ init_simple_stat_tables(stat_tap_table_ui *new_stat_tap, const char *filter)
error_string = register_tap_listener(new_stat_tap->tap_name, &ss->data, filter, 0, simple_stat_reset, new_stat_tap->packet_func, simple_stat_draw);
if(error_string){
- simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "%s", error_string->str);
- g_string_free(error_string, TRUE);
+ simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "%s", error_string);
+ wmem_free(NULL, error_string);
free_stat_tables(ss->new_stat_tap, NULL, NULL);
g_free(ss);
return;
diff --git a/ui/gtk/stats_tree_stat.c b/ui/gtk/stats_tree_stat.c
index 7979540f7f..85e8f977fb 100644
--- a/ui/gtk/stats_tree_stat.c
+++ b/ui/gtk/stats_tree_stat.c
@@ -399,7 +399,7 @@ init_gtk_tree(const char* opt_arg, void *userdata _U_)
tree_pres* pr = (tree_pres *)g_malloc(sizeof(tree_pres));
gchar* title = NULL;
gchar* window_name = NULL;
- GString* error_string;
+ gchar* error_string;
GtkWidget *scr_win;
size_t init_strlen;
GtkWidget *main_vb, *bbox, *bt_close, *bt_copy, *bt_saveas;
@@ -510,8 +510,8 @@ init_gtk_tree(const char* opt_arg, void *userdata _U_)
if (error_string) {
/* error, we failed to attach to the tap. clean up */
/* destroy_stat_tree_window(st); */
- report_failure("stats_tree for: %s failed to attach to the tap: %s",cfg->name,error_string->str);
- g_string_free(error_string, TRUE);
+ report_failure("stats_tree for: %s failed to attach to the tap: %s",cfg->name,error_string);
+ wmem_free(NULL, error_string);
}
/* Button row. */
diff --git a/ui/gtk/wlan_stat_dlg.c b/ui/gtk/wlan_stat_dlg.c
index 9cd9b86181..ec23d36cd4 100644
--- a/ui/gtk/wlan_stat_dlg.c
+++ b/ui/gtk/wlan_stat_dlg.c
@@ -158,7 +158,7 @@ wlanstat_reset (void *phs)
wlan_ep_t *list = wlan_stat->ep_list;
char *display_name;
char title[256];
- GString *error_string;
+ gchar *error_string;
GtkListStore *store;
const char *filter = NULL;
@@ -176,8 +176,8 @@ wlanstat_reset (void *phs)
error_string = set_tap_dfilter (wlan_stat, filter);
if (error_string) {
- simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "%s", error_string->str);
- g_string_free(error_string, TRUE);
+ simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "%s", error_string);
+ wmem_free(NULL, error_string);
return;
}
@@ -1745,7 +1745,7 @@ static void
wlanstat_dlg_create (void)
{
wlanstat_t *hs;
- GString *error_string;
+ gchar *error_string;
GtkWidget *scrolled_window;
GtkWidget *bbox;
GtkWidget *vbox;
@@ -1918,8 +1918,8 @@ wlanstat_dlg_create (void)
wlanstat_reset, wlanstat_packet,
wlanstat_draw);
if (error_string) {
- simple_dialog (ESD_TYPE_ERROR, ESD_BTN_OK, "%s", error_string->str);
- g_string_free (error_string, TRUE);
+ simple_dialog (ESD_TYPE_ERROR, ESD_BTN_OK, "%s", error_string);
+ wmem_free(NULL, error_string);
g_free (hs);
return;
}
diff --git a/ui/mcast_stream.c b/ui/mcast_stream.c
index badc1fcf36..4daca8b7d2 100644
--- a/ui/mcast_stream.c
+++ b/ui/mcast_stream.c
@@ -259,7 +259,7 @@ mcaststream_packet(void *arg, packet_info *pinfo, epan_dissect_t *edt _U_, const
/* increment the packets counter for this stream and calculate average pps */
++(strinfo->npackets);
-
+
if (deltatime > 0) {
strinfo->apackets = strinfo->npackets / deltatime;
strinfo->average_bw = ((double)(strinfo->total_bytes*8) / deltatime);
@@ -332,7 +332,7 @@ remove_tap_listener_mcast_stream(mcaststream_tapinfo_t *tapinfo)
void
register_tap_listener_mcast_stream(mcaststream_tapinfo_t *tapinfo)
{
- GString *error_string;
+ gchar *error_string;
if (!tapinfo) {
return;
@@ -345,8 +345,8 @@ register_tap_listener_mcast_stream(mcaststream_tapinfo_t *tapinfo)
if (error_string != NULL) {
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
- "%s", error_string->str);
- g_string_free(error_string, TRUE);
+ "%s", error_string);
+ wmem_free(NULL, error_string);
exit(1);
}
diff --git a/ui/qt/bluetooth_device_dialog.cpp b/ui/qt/bluetooth_device_dialog.cpp
index 5c72f2d2a4..a3a50d99f9 100644
--- a/ui/qt/bluetooth_device_dialog.cpp
+++ b/ui/qt/bluetooth_device_dialog.cpp
@@ -96,7 +96,7 @@ bluetooth_device_tap_reset(void *tapinfo_ptr)
static void
bluetooth_devices_tap(void *data)
{
- GString *error_string;
+ gchar *error_string;
error_string = register_tap_listener("bluetooth.device", data, NULL,
0,
@@ -107,8 +107,8 @@ bluetooth_devices_tap(void *data)
if (error_string != NULL) {
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
- "%s", error_string->str);
- g_string_free(error_string, TRUE);
+ "%s", error_string);
+ g_free(error_string);
}
}
diff --git a/ui/qt/bluetooth_hci_summary_dialog.cpp b/ui/qt/bluetooth_hci_summary_dialog.cpp
index a29d3f8136..87aad65e67 100644
--- a/ui/qt/bluetooth_hci_summary_dialog.cpp
+++ b/ui/qt/bluetooth_hci_summary_dialog.cpp
@@ -79,7 +79,7 @@ bluetooth_device_tap_reset(void *tapinfo_ptr)
static void
bluetooth_devices_tap(void *data)
{
- GString *error_string;
+ gchar *error_string;
error_string = register_tap_listener("bluetooth.hci_summary", data, NULL,
0,
@@ -90,8 +90,8 @@ bluetooth_devices_tap(void *data)
if (error_string != NULL) {
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
- "%s", error_string->str);
- g_string_free(error_string, TRUE);
+ "%s", error_string);
+ wmem_free(NULL, error_string);
}
}
diff --git a/ui/qt/expert_info_dialog.cpp b/ui/qt/expert_info_dialog.cpp
index ea19f1f60f..7dfb3101a5 100644
--- a/ui/qt/expert_info_dialog.cpp
+++ b/ui/qt/expert_info_dialog.cpp
@@ -312,11 +312,11 @@ void ExpertInfoDialog::retapPackets()
}
if (ui->limitCheckBox->isChecked()) {
- GString *error_string = set_tap_dfilter(this, display_filter_.toUtf8().constData());
+ gchar *error_string = set_tap_dfilter(this, display_filter_.toUtf8().constData());
if (error_string) {
QMessageBox::warning(this, tr("Endpoint expert failed to set filter"),
- error_string->str);
- g_string_free(error_string, TRUE);
+ error_string);
+ wmem_free(NULL, error_string);
return;
}
}
diff --git a/ui/qt/gsm_map_summary_dialog.cpp b/ui/qt/gsm_map_summary_dialog.cpp
index 3265068e94..2ad0c5c0c1 100644
--- a/ui/qt/gsm_map_summary_dialog.cpp
+++ b/ui/qt/gsm_map_summary_dialog.cpp
@@ -371,7 +371,7 @@ gsm_map_summary_packet(void *tapdata, packet_info *, epan_dissect_t *, const voi
void
register_tap_listener_qt_gsm_map_summary(void)
{
- GString *err_p;
+ gchar *err_p;
memset((void *) &gsm_map_stat, 0, sizeof(gsm_map_stat_t));
@@ -383,8 +383,8 @@ register_tap_listener_qt_gsm_map_summary(void)
if (err_p != NULL)
{
- simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "%s", err_p->str);
- g_string_free(err_p, TRUE);
+ simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "%s", err_p);
+ wmem_free(NULL, err_p);
exit(1);
}
diff --git a/ui/qt/io_graph_dialog.cpp b/ui/qt/io_graph_dialog.cpp
index 7270d49572..3b18fffb0d 100644
--- a/ui/qt/io_graph_dialog.cpp
+++ b/ui/qt/io_graph_dialog.cpp
@@ -1650,7 +1650,7 @@ IOGraph::IOGraph(QCustomPlot *parent) :
graph_ = parent_->addGraph(parent_->xAxis, parent_->yAxis);
Q_ASSERT(graph_ != NULL);
- GString *error_string;
+ gchar *error_string;
error_string = register_tap_listener("frame",
this,
"",
@@ -1661,7 +1661,7 @@ IOGraph::IOGraph(QCustomPlot *parent) :
if (error_string) {
// QMessageBox::critical(this, tr("%1 failed to register tap listener").arg(name_),
// error_string->str);
- g_string_free(error_string, TRUE);
+ wmem_free(NULL, error_string);
}
setFilter(QString());
@@ -1682,6 +1682,7 @@ IOGraph::~IOGraph() {
void IOGraph::setFilter(const QString &filter)
{
GString *error_string;
+ gchar* filter_error_string;
QString full_filter(filter.trimmed());
config_err_.clear();
@@ -1719,10 +1720,10 @@ void IOGraph::setFilter(const QString &filter)
}
}
- error_string = set_tap_dfilter(this, full_filter.toUtf8().constData());
- if (error_string) {
- config_err_ = error_string->str;
- g_string_free(error_string, TRUE);
+ filter_error_string = set_tap_dfilter(this, full_filter.toUtf8().constData());
+ if (filter_error_string) {
+ config_err_ = filter_error_string;
+ wmem_free(NULL, filter_error_string);
return;
} else {
if (filter_.compare(filter) && visible_) {
diff --git a/ui/qt/lbm_lbtrm_transport_dialog.cpp b/ui/qt/lbm_lbtrm_transport_dialog.cpp
index b232f927ed..87a8b03b08 100644
--- a/ui/qt/lbm_lbtrm_transport_dialog.cpp
+++ b/ui/qt/lbm_lbtrm_transport_dialog.cpp
@@ -1295,7 +1295,7 @@ void LBMLBTRMTransportDialog::resetReceiversDetail(void)
void LBMLBTRMTransportDialog::fillTree(void)
{
- GString * error_string;
+ gchar * error_string;
if (m_capture_file == NULL)
{
@@ -1313,8 +1313,8 @@ void LBMLBTRMTransportDialog::fillTree(void)
if (error_string)
{
QMessageBox::critical(this, tr("LBT-RM Statistics failed to attach to tap"),
- error_string->str);
- g_string_free(error_string, TRUE);
+ error_string);
+ wmem_free(NULL, error_string);
reject();
}
diff --git a/ui/qt/lbm_lbtru_transport_dialog.cpp b/ui/qt/lbm_lbtru_transport_dialog.cpp
index a787b12808..65982b2d73 100644
--- a/ui/qt/lbm_lbtru_transport_dialog.cpp
+++ b/ui/qt/lbm_lbtru_transport_dialog.cpp
@@ -1715,7 +1715,7 @@ void LBMLBTRUTransportDialog::resetReceiversDetail(void)
void LBMLBTRUTransportDialog::fillTree(void)
{
- GString * error_string;
+ gchar * error_string;
if (m_capture_file == NULL)
{
@@ -1733,8 +1733,8 @@ void LBMLBTRUTransportDialog::fillTree(void)
if (error_string)
{
QMessageBox::critical(this, tr("LBT-RU Statistics failed to attach to tap"),
- error_string->str);
- g_string_free(error_string, TRUE);
+ error_string);
+ wmem_free(NULL, error_string);
reject();
}
diff --git a/ui/qt/lbm_stream_dialog.cpp b/ui/qt/lbm_stream_dialog.cpp
index 000527a679..1aa90d8b90 100644
--- a/ui/qt/lbm_stream_dialog.cpp
+++ b/ui/qt/lbm_stream_dialog.cpp
@@ -372,7 +372,7 @@ void LBMStreamDialog::setCaptureFile(capture_file * cfile)
void LBMStreamDialog::fillTree(void)
{
- GString * error_string;
+ gchar * error_string;
if (m_capture_file == NULL)
{
@@ -390,8 +390,8 @@ void LBMStreamDialog::fillTree(void)
if (error_string)
{
QMessageBox::critical(this, tr("LBM Stream failed to attach to tap"),
- error_string->str);
- g_string_free(error_string, TRUE);
+ error_string);
+ wmem_free(NULL, error_string);
reject();
}
diff --git a/ui/qt/mtp3_summary_dialog.cpp b/ui/qt/mtp3_summary_dialog.cpp
index f009f939e9..2611238469 100644
--- a/ui/qt/mtp3_summary_dialog.cpp
+++ b/ui/qt/mtp3_summary_dialog.cpp
@@ -371,7 +371,7 @@ mtp3_summary_packet(
void
register_tap_listener_qt_mtp3_summary(void)
{
- GString *err_p;
+ gchar *err_p;
memset((void *) &mtp3_stat, 0, sizeof(mtp3_stat));
@@ -383,8 +383,8 @@ register_tap_listener_qt_mtp3_summary(void)
if (err_p != NULL)
{
- simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "%s", err_p->str);
- g_string_free(err_p, TRUE);
+ simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "%s", err_p);
+ wmem_free(NULL, err_p);
exit(1);
}
diff --git a/ui/qt/wireshark_dialog.cpp b/ui/qt/wireshark_dialog.cpp
index ba5cd12bb1..37066f8e0a 100644
--- a/ui/qt/wireshark_dialog.cpp
+++ b/ui/qt/wireshark_dialog.cpp
@@ -116,12 +116,12 @@ void WiresharkDialog::updateWidgets()
bool WiresharkDialog::registerTapListener(const char *tap_name, void *tap_data, const char *filter, guint flags, void(*tap_reset)(void *), gboolean(*tap_packet)(void *, struct _packet_info *, struct epan_dissect *, const void *), void(*tap_draw)(void *))
{
- GString *error_string = register_tap_listener(tap_name, tap_data, filter, flags,
+ gchar *error_string = register_tap_listener(tap_name, tap_data, filter, flags,
tap_reset, tap_packet, tap_draw);
if (error_string) {
QMessageBox::warning(this, tr("Failed to attach to tap \"%1\"").arg(tap_name),
- error_string->str);
- g_string_free(error_string, TRUE);
+ error_string);
+ wmem_free(NULL, error_string);
return false;
}
diff --git a/ui/rtp_stream.c b/ui/rtp_stream.c
index 01b6198345..afaf678a25 100644
--- a/ui/rtp_stream.c
+++ b/ui/rtp_stream.c
@@ -193,7 +193,7 @@ remove_tap_listener_rtp_stream(rtpstream_tapinfo_t *tapinfo)
void
register_tap_listener_rtp_stream(rtpstream_tapinfo_t *tapinfo, const char *fstring)
{
- GString *error_string;
+ gchar *error_string;
if (!tapinfo) {
return;
@@ -206,8 +206,8 @@ register_tap_listener_rtp_stream(rtpstream_tapinfo_t *tapinfo, const char *fstri
if (error_string != NULL) {
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
- "%s", error_string->str);
- g_string_free(error_string, TRUE);
+ "%s", error_string);
+ wmem_free(NULL, error_string);
exit(1);
}
diff --git a/ui/tap-rlc-graph.c b/ui/tap-rlc-graph.c
index e5bb6cfeb5..38980f991a 100644
--- a/ui/tap-rlc-graph.c
+++ b/ui/tap-rlc-graph.c
@@ -114,7 +114,7 @@ rlc_lte_tap_info *select_rlc_lte_session(capture_file *cf,
epan_dissect_t edt;
dfilter_t *sfcode;
- GString *error_string;
+ gchar *error_string;
nstime_t rel_ts;
/* Initialised to no known channels */
th_t th = {0, {NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL}};
@@ -139,8 +139,8 @@ rlc_lte_tap_info *select_rlc_lte_session(capture_file *cf,
error_string = register_tap_listener("rlc-lte", &th, NULL, 0, NULL, tap_lte_rlc_packet, NULL);
if (error_string){
fprintf(stderr, "wireshark: Couldn't register rlc_lte_graph tap: %s\n",
- error_string->str);
- g_string_free(error_string, TRUE);
+ error_string);
+ wmem_free(NULL, error_string);
exit(1); /* XXX: fix this */
}
@@ -250,7 +250,7 @@ gboolean rlc_graph_segment_list_get(capture_file *cf, struct rlc_graph *g, gbool
char **err_string)
{
struct rlc_segment current;
- GString *error_string;
+ gchar *error_string;
g_log(NULL, G_LOG_LEVEL_DEBUG, "graph_segment_list_get()");
@@ -283,8 +283,8 @@ gboolean rlc_graph_segment_list_get(capture_file *cf, struct rlc_graph *g, gbool
error_string = register_tap_listener("rlc-lte", g, "rlc-lte", 0, NULL, rlc_lte_tap_for_graph_data, NULL);
if (error_string) {
fprintf(stderr, "wireshark: Couldn't register rlc_graph tap: %s\n",
- error_string->str);
- g_string_free(error_string, TRUE);
+ error_string);
+ wmem_free(NULL, error_string);
exit(1); /* XXX: fix this */
}
cf_retap_packets(cf);
diff --git a/ui/tap-sctp-analysis.c b/ui/tap-sctp-analysis.c
index d5e6faf179..3ace8546a1 100644
--- a/ui/tap-sctp-analysis.c
+++ b/ui/tap-sctp-analysis.c
@@ -1239,13 +1239,13 @@ sctp_stat_get_info(void)
void
register_tap_listener_sctp_stat(void)
{
- GString *error_string;
+ gchar *error_string;
if (!sctp_tapinfo_struct.is_registered)
{
if ((error_string = register_tap_listener("sctp", &sctp_tapinfo_struct, NULL, 0, reset, packet, NULL))) {
- simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "%s", error_string->str);
- g_string_free(error_string, TRUE);
+ simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "%s", error_string);
+ wmem_free(NULL, error_string);
return;
}
sctp_tapinfo_struct.is_registered=TRUE;
diff --git a/ui/tap-tcp-stream.c b/ui/tap-tcp-stream.c
index abf357683d..7e40785cf9 100644
--- a/ui/tap-tcp-stream.c
+++ b/ui/tap-tcp-stream.c
@@ -116,7 +116,7 @@ void
graph_segment_list_get(capture_file *cf, struct tcp_graph *tg, gboolean stream_known)
{
struct segment current;
- GString *error_string;
+ gchar *error_string;
tcp_scan_t ts;
g_log(NULL, G_LOG_LEVEL_DEBUG, "graph_segment_list_get()");
@@ -152,8 +152,8 @@ graph_segment_list_get(capture_file *cf, struct tcp_graph *tg, gboolean stream_k
error_string = register_tap_listener("tcp", &ts, "tcp", 0, NULL, tapall_tcpip_packet, NULL);
if (error_string) {
fprintf(stderr, "wireshark: Couldn't register tcp_graph tap: %s\n",
- error_string->str);
- g_string_free(error_string, TRUE);
+ error_string);
+ wmem_free(NULL, error_string);
exit(1); /* XXX: fix this */
}
cf_retap_packets(cf);
@@ -288,7 +288,7 @@ select_tcpip_session(capture_file *cf, struct segment *hdrs)
epan_dissect_t edt;
dfilter_t *sfcode;
gchar *err_msg;
- GString *error_string;
+ gchar *error_string;
nstime_t rel_ts;
th_t th = {0, {NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL}};
@@ -312,8 +312,8 @@ select_tcpip_session(capture_file *cf, struct segment *hdrs)
error_string=register_tap_listener("tcp", &th, NULL, 0, NULL, tap_tcpip_packet, NULL);
if (error_string) {
fprintf(stderr, "wireshark: Couldn't register tcp_graph tap: %s\n",
- error_string->str);
- g_string_free(error_string, TRUE);
+ error_string);
+ wmem_free(NULL, error_string);
exit(1);
}
diff --git a/ui/tap_export_pdu.c b/ui/tap_export_pdu.c
index a151e72567..87420435c3 100644
--- a/ui/tap_export_pdu.c
+++ b/ui/tap_export_pdu.c
@@ -177,13 +177,11 @@ exp_pdu_close(exp_pdu_t *exp_pdu_tap_data)
char *
exp_pdu_pre_open(const char *tap_name, const char *filter, exp_pdu_t *exp_pdu_tap_data)
{
- GString *error_string;
-
/* XXX: can we always assume WTAP_ENCAP_WIRESHARK_UPPER_PDU? */
exp_pdu_tap_data->pkt_encap = wtap_wtap_encap_to_pcap_encap(WTAP_ENCAP_WIRESHARK_UPPER_PDU);
/* Register this tap listener now */
- error_string = register_tap_listener(tap_name, /* The name of the tap we want to listen to */
+ return register_tap_listener(tap_name, /* The name of the tap we want to listen to */
exp_pdu_tap_data, /* instance identifier/pointer to a struct holding
* all state variables */
filter, /* pointer to a filter string */
@@ -191,10 +189,6 @@ exp_pdu_pre_open(const char *tap_name, const char *filter, exp_pdu_t *exp_pdu_ta
NULL,
export_pdu_packet,
NULL);
- if (error_string != NULL)
- return g_string_free(error_string, FALSE);
-
- return NULL;
}
diff --git a/ui/voip_calls.c b/ui/voip_calls.c
index 609ead9fba..2f180b3adc 100644
--- a/ui/voip_calls.c
+++ b/ui/voip_calls.c
@@ -532,7 +532,7 @@ rtp_event_packet(void *tap_offset_ptr, packet_info *pinfo, epan_dissect_t *edt _
void
rtp_event_init_tap(voip_calls_tapinfo_t *tap_id_base)
{
- GString *error_string;
+ gchar *error_string;
error_string = register_tap_listener("rtpevent", tap_base_to_id(tap_id_base, tap_id_offset_rtp_event_),
NULL,
@@ -544,8 +544,8 @@ rtp_event_init_tap(voip_calls_tapinfo_t *tap_id_base)
if (error_string != NULL) {
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
- "%s", error_string->str);
- g_string_free(error_string, TRUE);
+ "%s", error_string);
+ wmem_free(NULL, error_string);
}
}
@@ -840,7 +840,7 @@ rtp_packet_draw(void *tap_offset_ptr)
void
rtp_init_tap(voip_calls_tapinfo_t *tap_id_base)
{
- GString *error_string;
+ gchar *error_string;
error_string = register_tap_listener("rtp", tap_base_to_id(tap_id_base, tap_id_offset_rtp_), NULL,
0,
@@ -850,8 +850,8 @@ rtp_init_tap(voip_calls_tapinfo_t *tap_id_base)
);
if (error_string != NULL) {
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
- "%s", error_string->str);
- g_string_free(error_string, TRUE);
+ "%s", error_string);
+ wmem_free(NULL, error_string);
}
}
@@ -1036,7 +1036,7 @@ t38_draw(void *tap_offset_ptr)
void
t38_init_tap(voip_calls_tapinfo_t *tap_id_base)
{
- GString *error_string;
+ gchar *error_string;
error_string = register_tap_listener("t38", tap_base_to_id(tap_id_base, tap_id_offset_t38_), NULL,
0,
@@ -1046,8 +1046,8 @@ t38_init_tap(voip_calls_tapinfo_t *tap_id_base)
);
if (error_string != NULL) {
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
- "%s", error_string->str);
- g_string_free(error_string, TRUE);
+ "%s", error_string);
+ wmem_free(NULL, error_string);
}
}
@@ -1267,7 +1267,7 @@ sip_calls_draw(void *tap_offset_ptr)
void
sip_calls_init_tap(voip_calls_tapinfo_t *tap_id_base)
{
- GString *error_string;
+ gchar *error_string;
error_string = register_tap_listener("sip", tap_base_to_id(tap_id_base, tap_id_offset_sip_), NULL,
0,
@@ -1277,8 +1277,8 @@ sip_calls_init_tap(voip_calls_tapinfo_t *tap_id_base)
);
if (error_string != NULL) {
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
- "%s", error_string->str);
- g_string_free(error_string, TRUE);
+ "%s", error_string);
+ wmem_free(NULL, error_string);
}
}
@@ -1470,7 +1470,7 @@ isup_calls_draw(void *tap_offset_ptr)
void
isup_calls_init_tap(voip_calls_tapinfo_t *tap_id_base)
{
- GString *error_string;
+ gchar *error_string;
error_string = register_tap_listener("isup", tap_base_to_id(tap_id_base, tap_id_offset_isup_),
NULL,
@@ -1482,8 +1482,8 @@ isup_calls_init_tap(voip_calls_tapinfo_t *tap_id_base)
if (error_string != NULL) {
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
- "%s", error_string->str);
- g_string_free(error_string, TRUE);
+ "%s", error_string);
+ wmem_free(NULL, error_string);
}
}
@@ -1523,7 +1523,7 @@ mtp3_calls_packet(void *tap_offset_ptr, packet_info *pinfo, epan_dissect_t *edt
void
mtp3_calls_init_tap(voip_calls_tapinfo_t *tap_id_base)
{
- GString *error_string;
+ gchar *error_string;
error_string = register_tap_listener("mtp3", tap_base_to_id(tap_id_base, tap_id_offset_mtp3_),
NULL,
@@ -1535,8 +1535,8 @@ mtp3_calls_init_tap(voip_calls_tapinfo_t *tap_id_base)
if (error_string != NULL) {
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
- "%s", error_string->str);
- g_string_free(error_string, TRUE);
+ "%s", error_string);
+ wmem_free(NULL, error_string);
}
error_string = register_tap_listener("m3ua", tap_base_to_id(tap_id_base, tap_id_offset_m3ua_),
@@ -1549,8 +1549,8 @@ mtp3_calls_init_tap(voip_calls_tapinfo_t *tap_id_base)
if (error_string != NULL) {
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
- "%s", error_string->str);
- g_string_free(error_string, TRUE);
+ "%s", error_string);
+ wmem_free(NULL, error_string);
}
}
@@ -1851,7 +1851,7 @@ q931_calls_draw(void *tap_offset_ptr)
void
q931_calls_init_tap(voip_calls_tapinfo_t *tap_id_base)
{
- GString *error_string;
+ gchar *error_string;
error_string = register_tap_listener("q931", tap_base_to_id(tap_id_base, tap_id_offset_q931_),
NULL,
@@ -1863,8 +1863,8 @@ q931_calls_init_tap(voip_calls_tapinfo_t *tap_id_base)
if (error_string != NULL) {
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
- "%s", error_string->str);
- g_string_free(error_string, TRUE);
+ "%s", error_string);
+ wmem_free(NULL, error_string);
}
}
@@ -2144,7 +2144,7 @@ h225_calls_draw(void *tap_offset_ptr)
void
h225_calls_init_tap(voip_calls_tapinfo_t *tap_id_base)
{
- GString *error_string;
+ gchar *error_string;
error_string = register_tap_listener("h225", tap_base_to_id(tap_id_base, tap_id_offset_h225_), NULL,
0,
@@ -2155,8 +2155,8 @@ h225_calls_init_tap(voip_calls_tapinfo_t *tap_id_base)
if (error_string != NULL) {
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
- "%s", error_string->str);
- g_string_free(error_string, TRUE);
+ "%s", error_string);
+ wmem_free(NULL, error_string);
}
}
@@ -2304,7 +2304,7 @@ h245dg_calls_draw(void *tap_offset_ptr)
void
h245dg_calls_init_tap(voip_calls_tapinfo_t *tap_id_base)
{
- GString *error_string;
+ gchar *error_string;
if (!tap_id_base->h245_labels) {
tap_id_base->h245_labels = g_new0(h245_labels_t, 1);
@@ -2319,8 +2319,8 @@ h245dg_calls_init_tap(voip_calls_tapinfo_t *tap_id_base)
if (error_string != NULL) {
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
- "%s", error_string->str);
- g_string_free(error_string, TRUE);
+ "%s", error_string);
+ wmem_free(NULL, error_string);
}
}
@@ -2378,7 +2378,7 @@ sdp_calls_draw(void *tap_offset_ptr)
void
sdp_calls_init_tap(voip_calls_tapinfo_t *tap_id_base)
{
- GString *error_string;
+ gchar *error_string;
error_string = register_tap_listener("sdp", tap_base_to_id(tap_id_base, tap_id_offset_sdp_), NULL,
0,
@@ -2389,8 +2389,8 @@ sdp_calls_init_tap(voip_calls_tapinfo_t *tap_id_base)
if (error_string != NULL) {
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
- "%s", error_string->str);
- g_string_free(error_string, TRUE);
+ "%s", error_string);
+ wmem_free(NULL, error_string);
}
}
@@ -2752,7 +2752,7 @@ mgcp_calls_draw(void *tap_offset_ptr)
void
mgcp_calls_init_tap(voip_calls_tapinfo_t *tap_id_base)
{
- GString *error_string;
+ gchar *error_string;
/*
* We set TL_REQUIRES_PROTO_TREE to force a non-null "tree"
@@ -2770,8 +2770,8 @@ mgcp_calls_init_tap(voip_calls_tapinfo_t *tap_id_base)
);
if (error_string != NULL) {
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
- "%s", error_string->str);
- g_string_free(error_string, TRUE);
+ "%s", error_string);
+ wmem_free(NULL, error_string);
}
}
@@ -2885,7 +2885,7 @@ actrace_calls_draw(void *tap_offset_ptr)
void
actrace_calls_init_tap(voip_calls_tapinfo_t *tap_id_base)
{
- GString *error_string;
+ gchar *error_string;
error_string = register_tap_listener("actrace", tap_base_to_id(tap_id_base, tap_id_offset_actrace_), NULL,
0,
@@ -2896,8 +2896,8 @@ actrace_calls_init_tap(voip_calls_tapinfo_t *tap_id_base)
if (error_string != NULL) {
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
- "%s", error_string->str);
- g_string_free(error_string, TRUE);
+ "%s", error_string);
+ wmem_free(NULL, error_string);
}
}
@@ -3056,7 +3056,7 @@ megaco_calls_draw(void *tap_offset_ptr)
void
h248_calls_init_tap(voip_calls_tapinfo_t *tap_id_base)
{
- GString *error_string;
+ gchar *error_string;
error_string = register_tap_listener("megaco", tap_base_to_id(tap_id_base, tap_id_offset_megaco_),
NULL,
@@ -3067,8 +3067,8 @@ h248_calls_init_tap(voip_calls_tapinfo_t *tap_id_base)
if (error_string != NULL) {
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
- "%s", error_string->str);
- g_string_free(error_string, TRUE);
+ "%s", error_string);
+ wmem_free(NULL, error_string);
}
error_string = register_tap_listener("h248", tap_base_to_id(tap_id_base, tap_id_offset_h248_),
@@ -3080,8 +3080,8 @@ h248_calls_init_tap(voip_calls_tapinfo_t *tap_id_base)
if (error_string != NULL) {
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
- "%s", error_string->str);
- g_string_free(error_string, TRUE);
+ "%s", error_string);
+ wmem_free(NULL, error_string);
}
}
@@ -3249,7 +3249,7 @@ sua_calls_draw(void *tap_offset_ptr)
void sccp_calls_init_tap(voip_calls_tapinfo_t *tap_id_base)
{
- GString *error_string;
+ gchar *error_string;
error_string = register_tap_listener("sccp", tap_base_to_id(tap_id_base, tap_id_offset_sccp_),
NULL,
@@ -3260,8 +3260,8 @@ void sccp_calls_init_tap(voip_calls_tapinfo_t *tap_id_base)
if (error_string != NULL) {
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
- "%s", error_string->str);
- g_string_free(error_string, TRUE);
+ "%s", error_string);
+ wmem_free(NULL, error_string);
}
error_string = register_tap_listener("sua", tap_base_to_id(tap_id_base, tap_id_offset_sua_),
@@ -3273,8 +3273,8 @@ void sccp_calls_init_tap(voip_calls_tapinfo_t *tap_id_base)
if (error_string != NULL) {
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
- "%s", error_string->str);
- g_string_free(error_string, TRUE);
+ "%s", error_string);
+ wmem_free(NULL, error_string);
}
}
@@ -3772,7 +3772,7 @@ unistim_calls_draw(void *tap_offset_ptr)
void
unistim_calls_init_tap(voip_calls_tapinfo_t *tap_id_base) {
- GString *error_string;
+ gchar *error_string;
error_string = register_tap_listener("unistim", tap_base_to_id(tap_id_base, tap_id_offset_unistim_),
NULL,
@@ -3784,8 +3784,8 @@ unistim_calls_init_tap(voip_calls_tapinfo_t *tap_id_base) {
if (error_string != NULL) {
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
- "%s", error_string->str);
- g_string_free(error_string, TRUE);
+ "%s", error_string);
+ wmem_free(NULL, error_string);
}
}
@@ -3933,7 +3933,7 @@ skinny_calls_draw(void *tap_offset_ptr)
void
skinny_calls_init_tap(voip_calls_tapinfo_t *tap_id_base)
{
- GString *error_string;
+ gchar *error_string;
/*
* We set TL_REQUIRES_PROTO_TREE to force a non-null "tree"
@@ -3951,8 +3951,8 @@ skinny_calls_init_tap(voip_calls_tapinfo_t *tap_id_base)
);
if (error_string != NULL) {
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
- "%s", error_string->str);
- g_string_free(error_string, TRUE);
+ "%s", error_string);
+ wmem_free(NULL, error_string);
}
}
@@ -4072,7 +4072,7 @@ iax2_calls_draw(void *tap_offset_ptr)
void
iax2_calls_init_tap(voip_calls_tapinfo_t *tap_id_base)
{
- GString *error_string;
+ gchar *error_string;
/*
* We set TL_REQUIRES_PROTO_TREE to force a non-null "tree"
@@ -4093,8 +4093,8 @@ iax2_calls_init_tap(voip_calls_tapinfo_t *tap_id_base)
);
if (error_string != NULL) {
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "%s",
- error_string->str);
- g_string_free(error_string, TRUE);
+ error_string);
+ wmem_free(NULL, error_string);
}
}
@@ -4195,7 +4195,7 @@ voip_calls_draw(void *tap_offset_ptr)
void
voip_calls_init_tap(voip_calls_tapinfo_t *tap_id_base)
{
- GString *error_string;
+ gchar *error_string;
error_string = register_tap_listener("voip", tap_base_to_id(tap_id_base, tap_id_offset_voip_),
NULL,
@@ -4207,8 +4207,8 @@ voip_calls_init_tap(voip_calls_tapinfo_t *tap_id_base)
if (error_string != NULL) {
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
- "%s", error_string->str);
- g_string_free(error_string, TRUE);
+ "%s", error_string);
+ wmem_free(NULL, error_string);
}
}