summaryrefslogtreecommitdiff
path: root/extras/collect/collect.c
diff options
context:
space:
mode:
Diffstat (limited to 'extras/collect/collect.c')
-rw-r--r--extras/collect/collect.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/extras/collect/collect.c b/extras/collect/collect.c
index 355b85b5cf..3a7e826e4d 100644
--- a/extras/collect/collect.c
+++ b/extras/collect/collect.c
@@ -171,8 +171,7 @@ static int checkout(int fd)
if (debug)
fprintf(stderr, "Found word %s\n", word);
him = malloc(sizeof (struct _mate));
- him->name = malloc(strlen(word) + 1);
- strcpy(him->name, word);
+ him->name = strdup(word);
him->state = STATE_OLD;
udev_list_node_append(&him->node, &bunch);
word = NULL;