aboutsummaryrefslogtreecommitdiffstats
path: root/tap-h225counter.c
diff options
context:
space:
mode:
Diffstat (limited to 'tap-h225counter.c')
-rw-r--r--tap-h225counter.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/tap-h225counter.c b/tap-h225counter.c
index 2f4b6e3af8..16e89b5b75 100644
--- a/tap-h225counter.c
+++ b/tap-h225counter.c
@@ -352,21 +352,18 @@ static void
h225counter_init(const char *optarg, void* userdata _U_)
{
h225counter_t *hs;
- const char *filter=NULL;
GString *error_string;
+ hs = g_malloc(sizeof(h225counter_t));
if(!strncmp(optarg,"h225,counter,",13)){
- filter=optarg+13;
+ hs->filter=g_strdup(optarg+13);
} else {
- filter="";
+ hs->filter=NULL;
}
- hs = g_malloc(sizeof(h225counter_t));
- hs->filter=g_strdup(filter);
-
h225counter_reset(hs);
- error_string=register_tap_listener("h225", hs, filter, NULL, h225counter_packet, h225counter_draw);
+ error_string=register_tap_listener("h225", hs, hs->filter, 0, NULL, h225counter_packet, h225counter_draw);
if(error_string){
/* error, we failed to attach to the tap. clean up */
g_free(hs->filter);