From Andrew Feren (bug 2462):
[obnox/wireshark/wip.git] / tap-h225counter.c
index 5e6388b62d03adbcf0c010625c07fe60f4a53eeb..2f4b6e3af872810511b831aa3225637657b75d67 100644 (file)
@@ -225,7 +225,6 @@ h225counter_packet(void *phs, packet_info *pinfo _U_, epan_dissect_t *edt _U_, c
 
        default:
                return 0;
-               break;
        }
 
        return 1;
@@ -363,8 +362,7 @@ h225counter_init(const char *optarg, void* userdata _U_)
        }
 
        hs = g_malloc(sizeof(h225counter_t));
-       hs->filter=g_malloc(strlen(filter)+1);
-       strcpy(hs->filter, filter);
+       hs->filter=g_strdup(filter);
 
        h225counter_reset(hs);