aboutsummaryrefslogtreecommitdiffstats
path: root/tap-sctpchunkstat.c
diff options
context:
space:
mode:
Diffstat (limited to 'tap-sctpchunkstat.c')
-rw-r--r--tap-sctpchunkstat.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/tap-sctpchunkstat.c b/tap-sctpchunkstat.c
index de060d53fd..630d4f4c91 100644
--- a/tap-sctpchunkstat.c
+++ b/tap-sctpchunkstat.c
@@ -233,10 +233,9 @@ sctpstat_init(const char *optarg, void* userdata _U_)
}
hs = g_malloc(sizeof(sctpstat_t));
- hs->filter=g_malloc(strlen(filter)+1);
+ hs->filter=g_strdup(filter);
hs->ep_list = NULL;
hs->number_of_packets = 0;
- strcpy(hs->filter, filter);
sctpstat_reset(hs);