diff options
Diffstat (limited to 'ui/cli')
-rw-r--r-- | ui/cli/tap-camelsrt.c | 6 | ||||
-rw-r--r-- | ui/cli/tap-comparestat.c | 6 | ||||
-rw-r--r-- | ui/cli/tap-diameter-avp.c | 6 | ||||
-rw-r--r-- | ui/cli/tap-endpoints.c | 6 | ||||
-rw-r--r-- | ui/cli/tap-expert.c | 6 | ||||
-rw-r--r-- | ui/cli/tap-follow.c | 4 | ||||
-rw-r--r-- | ui/cli/tap-gsm_astat.c | 4 | ||||
-rw-r--r-- | ui/cli/tap-hosts.c | 6 | ||||
-rw-r--r-- | ui/cli/tap-httpstat.c | 6 | ||||
-rw-r--r-- | ui/cli/tap-icmpstat.c | 6 | ||||
-rw-r--r-- | ui/cli/tap-icmpv6stat.c | 6 | ||||
-rw-r--r-- | ui/cli/tap-iostat.c | 6 | ||||
-rw-r--r-- | ui/cli/tap-iousers.c | 6 | ||||
-rw-r--r-- | ui/cli/tap-macltestat.c | 4 | ||||
-rw-r--r-- | ui/cli/tap-protocolinfo.c | 6 | ||||
-rw-r--r-- | ui/cli/tap-protohierstat.c | 6 | ||||
-rw-r--r-- | ui/cli/tap-rlcltestat.c | 4 | ||||
-rw-r--r-- | ui/cli/tap-rpcprogs.c | 6 | ||||
-rw-r--r-- | ui/cli/tap-rtd.c | 6 | ||||
-rw-r--r-- | ui/cli/tap-rtp.c | 4 | ||||
-rw-r--r-- | ui/cli/tap-rtspstat.c | 6 | ||||
-rw-r--r-- | ui/cli/tap-sctpchunkstat.c | 6 | ||||
-rw-r--r-- | ui/cli/tap-simple_stattable.c | 6 | ||||
-rw-r--r-- | ui/cli/tap-sipstat.c | 6 | ||||
-rw-r--r-- | ui/cli/tap-smbsids.c | 6 | ||||
-rw-r--r-- | ui/cli/tap-srt.c | 6 | ||||
-rw-r--r-- | ui/cli/tap-stats_tree.c | 5 | ||||
-rw-r--r-- | ui/cli/tap-sv.c | 6 | ||||
-rw-r--r-- | ui/cli/tap-wspstat.c | 6 |
29 files changed, 82 insertions, 81 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); } } |