diff options
Diffstat (limited to 'tap-smbstat.c')
-rw-r--r-- | tap-smbstat.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/tap-smbstat.c b/tap-smbstat.c index aa0a2828be..5ddfaf65df 100644 --- a/tap-smbstat.c +++ b/tap-smbstat.c @@ -215,8 +215,7 @@ smbstat_init(const char *optarg,void* userdata _U_) ss=g_malloc(sizeof(smbstat_t)); if(filter){ - ss->filter=g_malloc(strlen(filter)+1); - strcpy(ss->filter, filter); + ss->filter=g_strdup(filter); } else { ss->filter=NULL; } |