aboutsummaryrefslogtreecommitdiffstats
path: root/tap-bootpstat.c
diff options
context:
space:
mode:
Diffstat (limited to 'tap-bootpstat.c')
-rw-r--r--tap-bootpstat.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/tap-bootpstat.c b/tap-bootpstat.c
index 83d304091a..1f23e44101 100644
--- a/tap-bootpstat.c
+++ b/tap-bootpstat.c
@@ -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;
}