aboutsummaryrefslogtreecommitdiffstats
path: root/tap-iostat.c
diff options
context:
space:
mode:
Diffstat (limited to 'tap-iostat.c')
-rw-r--r--tap-iostat.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/tap-iostat.c b/tap-iostat.c
index 5833a46bf5..225af8254d 100644
--- a/tap-iostat.c
+++ b/tap-iostat.c
@@ -663,8 +663,7 @@ iostat_init(const char *optarg, void* userdata _U_)
if(pos==str){
register_io_tap(io, i, NULL);
} else if(pos==NULL) {
- tmp=g_malloc(strlen(str)+1);
- strcpy(tmp,str);
+ tmp=g_strdup(str);
register_io_tap(io, i, tmp);
} else {
tmp=g_malloc((pos-str)+1);