Make infiniband plugin compile.
[obnox/wireshark/wip.git] / tap-camelcounter.c
index fa489c1ace8b0693ff88866f2d15298d447188f9..1989deeb421443bc4516dc4b6769b8741ed4f2c5 100644 (file)
@@ -1,6 +1,9 @@
 /* tap_camelcounter.c
  * camel message counter for tshark
  * Copyright 2006 Florent DROUIN
+ *
+ * $Id$
+ *
  * This part of code is extracted from tap-h225counter.c from Lars Roland
  *
  * Wireshark - Network traffic analyzer
@@ -104,8 +107,7 @@ static void camelcounter_init(const char *optarg, void* userdata _U_)
 
   p_camelcounter = g_malloc(sizeof(struct camelcounter_t));
   if(filter){
-    p_camelcounter->filter=g_malloc(strlen(filter)+1);
-    strcpy(p_camelcounter->filter,filter);
+    p_camelcounter->filter=g_strdup(filter);
   } else {
     p_camelcounter->filter=NULL;
   }