Avoid calling some free() on WIN32 on memory that may be allocated in
[obnox/wireshark/wip.git] / tap-bootpstat.c
index 83d304091a86004c3f0f6529496dc6adada71c9b..1f23e441013dd59a25e5763dd8b9f300fdd61131 100644 (file)
@@ -152,8 +152,7 @@ dhcpstat_init(const char *optarg, void* userdata _U_)
        sp = g_malloc( sizeof(dhcpstat_t) );
        sp->hash = g_hash_table_new( g_str_hash, g_str_equal);
        if(filter){
-               sp->filter=g_malloc(strlen(filter)+1);
-               strcpy(sp->filter,filter);
+               sp->filter=g_strdup(filter);
        } else {
                sp->filter=NULL;
        }